About
Turn text into the percent encoded form a URL needs, or take an encoded string back to something readable. It uses the component encoder, which is the right choice for a single parameter value and the wrong one for a whole address.
How to use
Paste the text and pick encode or decode. Encoding a full URL will also escape the slashes and the colon, so encode the value you are inserting rather than the address you are inserting it into.
Encode the value, not the address
There are two encoders, and the difference is which characters they consider structural. The component encoder escapes everything that could be punctuation in a URL, which is what you want for a single parameter value. The whole URL encoder leaves separators alone. Using the first on an entire address produces a string that is technically correct and completely unusable, and that is the mistake this page catches most often.
Spotting double encoding
A percent sign is itself encoded as %25, so text that has been through the process twice reads as %2520 where a space belongs. The tell is a %25 in front of what should be a normal escape. Decode until the text stops changing, then work out which of the two systems in the chain should stop encoding, because fixing it at the end is a patch rather than a repair.
Where this comes up
Building a query string by hand, reading an OAuth redirect where the state parameter contains a URL of its own, and untangling a tracking link that wrapped the destination three times. In each case the useful move is the same: decode one layer, look at what emerged, and repeat until it stops surprising you.
FAQ
Why did my https:// turn into gibberish?
Because you encoded the whole URL rather than one value inside it. Component encoding escapes the separators too, which is correct behaviour and rarely what you wanted.
The decoded text still has %25 in it.
It was encoded twice. Decode again and see whether it resolves. Double encoding usually comes from a value that passed through two systems that each thought they were the first.
Is the text sent anywhere?
No. Both directions run in the page.
Why do spaces sometimes become + instead of %20?
Form submissions use the plus convention and URLs use the percent one. Decoders that expect the wrong convention leave stray plus signs in the output.
Related tools
- Developer and text tools
- JSON Formatter
Format, minify and check JSON in the browser.
- Unix Timestamp Converter
Convert between epoch timestamps and dates.
- User Agent Parser
Break a UA string into browser, OS and device.
- Cookie Converter
Convert between HTTP, JSON and Netscape cookies.
- List Text Cleaner
Deduplicate, sort and tidy a pasted list.
- CSV to Table
Split delimited text into a table, copy as CSV or TSV.