All tools

URL Encode and Decode

Encoders

Percent-encode text for URLs and query strings, decode it back, and see a URL's parameters as a table.

  • Encoder
  • Runs offline
  • URL
Decoded
https://example.com/search?q=café & crème&sort=price:desc&tags=a,b
Query string
Scheme · hosthttps://example.com
Path/search
qcafé & crème
sortprice:desc
tagsa,b

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 and application/x-www-form-urlencoded bodies.
  • Double encoding%2520 means it was encoded twice: %25 is the % sign itself.

How to use the URL encoder

  1. Pick Encode or Decode.
  2. To build a link, encode each value as A Component, not the whole URL — otherwise a & inside a value starts a new parameter.
  3. Tick Form Encoding for form bodies and query strings written by HTML forms, where + means a space.
  4. Paste a full URL to see its parameters decoded in a table.
  5. 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.

Related tools

Learn more