URL encoding, also called percent-encoding, replaces characters that aren’t safe in a URL with a % followed by two hex digits — so a space becomes %20. It lets you put arbitrary text, like a search term or a token, inside a URL without breaking it. To encode or decode, paste your text into a URL encoder. Here is how it works.
Encode turns text into a percent-encoded string; decode turns it back.
Paste a value, query parameter or whole URL.
Component encoding escapes everything; whole-URL keeps the / : ? & = structure.
Use the encoded value in your link, API call or query string.
encodeURIComponent vs encodeURI
encodeURIComponent escapes every reserved character, which is what you want for a single query value. encodeURI leaves the structural characters (/ : ? & =) intact, which is right for a whole URL. The URL encoder offers both with a single toggle.
When do you need URL encoding?
Any time text goes into a URL: search queries, redirect targets, OAuth parameters and API query strings. If you are also working with tokens, the Base64 and JWT tools pair well with this one.
Tip: Encode each query value separately with component mode — encoding the whole assembled URL can double-encode the & and = and break your parameters.
URL-encode text now
Percent-encode or decode any text or URL — free, in your browser.
Open the URL Encoder →Frequently Asked Questions
Why does a space become %20?
Spaces aren’t allowed in URLs, so they’re percent-encoded as %20 (or sometimes + in form data).
What is the difference between the two modes?
Component encoding escapes all reserved characters; whole-URL encoding keeps the structural characters like slashes and query separators.
Is my text uploaded?
No — encoding and decoding run in your browser.