URL encode and decode
Percent-encode text for a URL or decode it back, and split any URL into its parts and query parameters.
Runs entirely in your browser
Split a URL into parts
Query parameters
| # | Name | Value (decoded) |
|---|
Text up to about 5 MB. Results update as you type.
How to encode or decode a URL
- Pick Encode or Decode, then choose what the text is: a single value (component), a whole URL, or form data.
- Type or paste your text. The result appears below as you type; a broken escape is reported with its position.
- Copy the result, or paste a full URL into the parser further down to see its host, path and query parameters.
What URL encoding does
A URL may only contain a limited set of ASCII characters, and some of them have a job: / separates path segments, ? starts the query, & and = split it into names and values, # starts the fragment. Percent-encoding writes any other byte as % followed by two hex digits, so a value such as R&D / 2026 can travel inside a query string without being mistaken for structure: R%26D%20%2F%202026.
Text is first turned into UTF-8 bytes, which is why one accented letter becomes two escapes and an emoji becomes four. Decoding reverses the process and checks that the bytes form valid UTF-8. This tool decodes with its own strict reader, so instead of a generic "URI malformed" error it tells you which escape is broken and where.
The three modes match the three common situations. Encode a single value (component) when you are building a query parameter or a path segment. Encode a whole URL only when you have a complete address with spaces or non-ASCII letters in it. Use form data for the body of a form post or a query string built the way HTML forms build it.
Tips
- Need a clean, readable path instead of escapes? Make one with the slug generator.
- Binary data in a URL is usually Base64url, not percent-encoding: try Base64 encode and decode.
- A token in a query string that starts with
eyJis probably a JWT. Read it with the JWT decoder.
Questions
What is the difference between component and full URL encoding?
Component encoding (JavaScript's encodeURIComponent) escapes everything except letters, digits and - _ . ! ~ * ' ( ), so characters such as / ? & = become %2F %3F %26 %3D. Use it for a single query value or path segment. Full URL encoding (encodeURI) leaves the characters that give a URL its structure alone and only escapes spaces, non-ASCII letters and a few others, so a whole address stays usable.
When should I use form encoding?
Form encoding (application/x-www-form-urlencoded) is what an HTML form sends and what most query strings use. It writes a space as + and escapes everything except letters, digits and * - . _. When decoding in this mode, a + is read as a space; in the other modes it stays a plus sign.
How are accented letters and emoji encoded?
As UTF-8 bytes, each written as % plus two hex digits, which is what browsers and servers expect. For example é becomes %C3%A9. Decoding checks that the bytes form valid UTF-8 and tells you if they do not.
Why does decoding report an error?
Every percent sign must be followed by two hex digits (0-9, A-F). A stray %, a cut-off escape such as %A, or bytes that are not valid UTF-8 are reported with their position, so you can find them. If the text contains a literal percent sign, it should be written as %25.
Does the URL parser visit the address?
No. It uses the browser's built-in URL parser to split the text into parts; nothing is fetched and nothing is sent anywhere. The text you type stays in this tab.
Should I encode a whole URL more than once?
No. Encoding already-encoded text turns %20 into %2520, which is a common bug. If you see %25 followed by two hex digits in a result, the input was probably encoded already; decode it first.