URL Encoder & Decoder
Percent-encode text for URLs, or decode it back.
Questions
What is the difference between encoding a component and a full URL?
Encoding a component escapes &, =, ? and / because they would otherwise be read as URL structure. Use it for one value. Encoding a full URL leaves those alone so the address still works, and only escapes characters like spaces.
Why does a space become %20 sometimes and + other times?
Percent-encoding always gives %20. The + comes from HTML form submissions, a different and older format. Use %20 unless you're building a form body.
Why do I get an "invalid percent-encoding" error?
A % isn't followed by two hex digits, or the escapes don't form valid UTF-8. Often the text was already decoded, or was encoded twice and then partly decoded.
Which characters are never encoded?
The unreserved characters from RFC 3986: A–Z, a–z, 0–9 and - _ . ~. Encoding a component escapes everything else.
What does %2520 mean?
The value was encoded twice: the % from %20 was itself encoded as %25. Decode twice to recover it, and look for the duplicate encoding step in your code.
Related tools
- Base64 Encoder & DecoderEncode text to Base64 or decode it back, with URL-safe and file support.
- HTML Entity Encoder & DecoderEscape HTML special characters, or decode entities back to text.
- JSON Formatter & ValidatorFormat, minify, check and repair JSON, with errors shown by line and column.
- QR Code GeneratorQR codes for links, text and Wi-Fi logins, to print or save as SVG or PNG.