URL Encoder & Decoder
URL breakdown
Query parameters
| Name | Decoded value |
|---|
Runs entirely in your browser. Nothing you paste is uploaded or stored.
How to URL encode or decode
- Paste text, a query value or a whole URL into the Input box.
- Pick a mode. Query value / component escapes everything that is not safe inside a parameter, including
&,=,/and?. Full URL keeps the URL structure and only escapes characters such as spaces and non-English letters. - Click Encode or Decode. When the input is a full URL, you also get a breakdown of its parts and every query parameter, decoded.
What is URL encoding?
A URL may only contain a limited set of characters. Anything else, such as spaces, quotes, emoji or letters like é and ش, has to be written as a percent sign followed by the byte value in hex. This is called percent-encoding. For example, a space becomes %20, & becomes %26, and é becomes %C3%A9 (its two UTF-8 bytes).
Some characters are reserved because they have a job in the URL: ? starts the query string, & separates parameters, = separates a name from its value and # starts the fragment. If one of these appears inside a value, it must be encoded, or the URL means something different from what you intended.
Component vs full URL encoding
In JavaScript these are encodeURIComponent() and encodeURI():
encodeURIComponent('fish & chips') // "fish%20%26%20chips"
encodeURI('https://site.com/a b?x=1') // "https://site.com/a%20b?x=1"
Use component encoding for each value you insert into a link or an API request. Use full-URL encoding only to clean up a complete address that already has the right structure.
Why form data uses + for spaces
When an HTML form is submitted with the default application/x-www-form-urlencoded encoding, the browser joins every field as name=value pairs separated by &, and writes spaces as +. So a message field containing "Hi there" arrives as message=Hi+there. Turn on Treat + as space when you decode data copied from a form post or a server log.
Common URL encoding mistakes
- Double encoding. Encoding an already encoded value turns
%20into%2520. Decode first if you are not sure. - Encoding the whole URL as a component. This escapes
://and/and breaks the link. - Forgetting to encode user input. A search term containing
&silently splits into two parameters. - Mixing up + and %20. In a path,
+is a literal plus sign. Only in form-encoded query data does it mean a space.
Handling form submissions
If you are decoding form posts because you are building your own form handler, you can skip that work entirely. formvoxo gives any HTML form a hosted endpoint, decodes every field and emails the submission to you, with spam filtering built in. Read the docs to set it up in a few minutes.
Want the full guide? Read URL Encoding Explained: Percent-Encoding, Query Strings and Form Data.
Frequently asked questions
What is URL encoding? +
URL encoding (percent-encoding) replaces characters that are not allowed in a URL with a % followed by two hex digits. A space becomes %20 and & becomes %26.
Should I encode a full URL or just a value? +
Encode only the values you put into a query string (component mode). Encoding a full URL in component mode also escapes :, / and ?, which breaks the link. Use full-URL mode to clean up a whole address.
Why do I see + instead of %20? +
HTML forms submit data as application/x-www-form-urlencoded, where a space is written as +. Turn on "Treat + as space" when decoding form data.
How do HTML forms encode data? +
A normal form POST sends fields as name=value pairs joined with &, with each name and value URL-encoded. A form backend such as formvoxo decodes this for you automatically.
Is my data sent anywhere? +
No. Encoding, decoding and URL parsing all run locally in your browser.
More free tools
Need a backend for your HTML forms?
Point any form at formvoxo and get submissions in your inbox, with spam filtering built in. Free plan, no server code.
Create free account →