Morgana Tools

Data & APIs

URL encoder & decoder

Encode and decode URLs online: component mode vs full URI—locally, with clear errors.

Overview

Component mode uses `encodeURIComponent` / `decodeURIComponent`, which is what you want for individual query values or path segments. Full URL mode uses `encodeURI` / `decodeURI`, leaving delimiters like `:`, `/`, `?`, `#` intact. Toggle modes when switching between values pulled from forms and entire hrefs copied from the address bar.

Encoding scope
Choose URL encoding scope

Frequently asked questions

Why does URL decode fail with an “invalid” error in component mode?

`decodeURIComponent` is strict. Characters that were never percent-encoded (or malformed sequences) trigger an error.

When should I use full URL encode/decode vs query component mode?

Use component mode (encodeURIComponent) for individual query values or path segments. Use full URL mode (encodeURI) when you need to escape an entire href but keep delimiters like slashes and colons intact.

Is URL encoding and decoding done on your server?

No. Encode and decode happen purely in your browser session.

You may also find these tools useful.