Skip to content
ToolsNow
Guides All tools
Developer

URL encoder and decoder, with query breakdown

Percent-encode text for use in a URL, or decode an encoded URL back to something readable — with the parts broken out so you can see what you are looking at.

Runs entirely in your browser — nothing is uploaded.

Plain text
0 chars0 words0 lines

Escapes everything, including / ? & = — for a single query value.

Encoded URL
0 chars0 words0 lines

How to use

  1. Choose encode or decode. Decoding also shows a breakdown of the URL’s parts.
  2. Pick the scope. Component escapes everything including / ? & = — right for a single parameter value. Full URL keeps the structure intact.
  3. Read the breakdown. Protocol, host, port, path, query parameters and fragment, listed separately.

Questions

What is the difference between component and full URL?

Component encoding (encodeURIComponent) escapes the reserved characters / ? & = # too, which is what you need for a value going inside a query parameter. Full-URL encoding (encodeURI) leaves them alone so the address still works.

Why does + become a space when decoding?

Older form submissions encode spaces as +. The tool converts + to a space when decoding a component, which is almost always what you want when reading a query string.

Why is my URL rejected when decoding?

A lone % that is not followed by two hex digits is not valid percent-encoding. That usually means the string was double-encoded or truncated.

Should I encode the whole URL?

No. Encoding a whole URL as a component turns the slashes and colons into escapes and breaks it. Encode individual parameter values, not the address.

Related tools