Morgana Tools

Data & APIs

URL encoder & decoder

Free URL encoder and decoder: percent-encode query values with encodeURIComponent or whole URLs with encodeURI. Clear error messages, runs locally.

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.

Tools that complement this one—same upfront privacy notes apply.