What URL encoding is
A URL may only contain a small set of ASCII characters. Everything else — spaces, accents, emoji, and characters that mean something in a URL, like &, = and ? — is written as % followed by two hex digits for each UTF-8 byte. A space becomes %20; é becomes %C3%A9. This is called percent-encoding.
- ComponentEncodes everything but letters, digits and
- _ . ! ~ * ' ( ). For one value or path segment.encodeURIComponent. - Full URLKeeps
: / ? & = #so the URL still works.encodeURI. - Form encodingSpaces become
+. HTML forms andapplication/x-www-form-urlencodedbodies. - Double encoding
%2520means it was encoded twice:%25is the%sign itself.
How to use the URL encoder
- Pick Encode or Decode.
- To build a link, encode each value as A Component, not the whole URL — otherwise a
&inside a value starts a new parameter. - Tick Form Encoding for form bodies and query strings written by HTML forms, where
+means a space. - Paste a full URL to see its parameters decoded in a table.
- If the decoded result still has
%escapes, press Use as Input and decode again.
Examples
Read a search URL
Decode it and see every parameter on its own row.
Put an & inside a value
Encoded as a component, the & no longer splits the query.
Fix a double-encoded name
%2520 decodes to %20 — encoded twice.
Decode a form body
With Form Encoding, + is a space and %2B is a plus.
Frequently asked questions
Should a space be %20 or +?
%20 is correct everywhere in a URL. + means a space only in form-encoded data — query strings written by HTML forms and form bodies. In a path, + is a plus sign.
Why does my URL contain %2520?
It was encoded twice. %25 is the encoded %, so %2520 is an encoded %20. Decode it twice, then find the step that encodes again.
Which characters must be encoded?
In a component, everything except letters, digits and - _ . ~ is safe to encode, and & = ? # / + and spaces must be. encodeURIComponent also leaves ! * ' ( ) as they are.
Why can't my text be decoded?
A % must be followed by two hex digits, and the bytes must form valid UTF-8. The error says where it breaks. Text encoded in an old character set such as Latin-1 cannot be read as UTF-8.
Is my URL sent anywhere?
No. Encoding, decoding and the parameter table all run in your browser; the page never opens the URL you paste.