URL encoder & decoder
Encode text so it survives inside a URL, or decode an unreadable link back into plain text. Paste a full URL and the page also breaks out its protocol, host, path and query parameters.
How to use the url encoder & decoder
- Paste your text or URL.
- Choose component encoding for a single value, or full-URL encoding to keep the structure intact.
- Encode or decode, then copy.
How it works
Percent encoding replaces unsafe characters with a % followed by their hexadecimal byte values — a space becomes %20, an ampersand %26. The distinction between the two modes matters: component encoding escapes &, ? and / because they are data, while full-URL encoding leaves them alone because they are structure.
Encoding a whole URL with component mode is a common bug: it turns https://ledger365.store into https%3A%2F%2Fledger365.store, which is correct only when the URL is itself a query parameter value.
Common questions
When do I need encodeURIComponent versus encodeURI?
Use component encoding for a value you are putting inside a query string, and full-URL encoding when you are tidying a complete address.
Why does a space become %20 sometimes and + others?
Both appear. %20 is correct in paths, while + is a legacy convention in form-encoded query strings.