How to use it
Choose Encode or Decode and paste your text. Everything runs in your browser; nothing is sent anywhere.
- Part of a URL encodes every special character, including
& = ? / #. Use it for one query value or path segment, for example a search term. - Whole URL keeps the characters that give a URL its structure and only encodes spaces, Hindi and other non-ASCII text, and unsafe characters.
- When decoding, Treat + as a space matches how query strings and HTML forms are written. Turn it off if a real
+should stay.
Paste a full URL to also see its parts and every query parameter decoded in a table.
URL encoding in code
- JavaScript:
encodeURIComponent(value)for a part,encodeURI(url)for a whole URL, anddecodeURIComponent(text) - Python:
urllib.parse.quote(value, safe='')andurllib.parse.unquote_plus(text) - Java:
URLEncoder.encode(value, StandardCharsets.UTF_8)(writes spaces as +)
Questions
What is URL encoding?
Also called percent-encoding: characters that are not allowed or have a special meaning in a URL are written as % followed by two hex digits of their UTF-8 bytes. A space becomes %20, & becomes %26 and the Hindi letter न becomes %E0%A4%A8.
Should a space be %20 or +?
Both mean a space inside a query string (the part after ?), because HTML forms send spaces as +. In the path part of a URL only %20 works, so %20 is the safe choice unless a system asks for +.
Why does my decoded text still have %20 in it?
The text was encoded twice (%2520 is an encoded %20). Use “Still encoded: decode again” until the text is clean, and fix the code that encodes it twice.
Why do I get an error when decoding?
Either a % is not followed by two hex digits (for example a real “100%”), or the %XX bytes do not form complete UTF-8 characters, which happens when an encoded URL was cut off.
More tools
- PDF editor — fill, sign, annotate and redact
- Compress image to a target size
- Image converter and resizer
- Images to PDF
- Merge PDF files
- Split PDF and extract pages
- PDF to image — JPG, PNG or WebP
- Image & PDF to text (OCR) — Hindi and English
- Rotate PDF pages
- QR code generator — links, UPI, Wi-Fi, contacts
- URL shortener with click count
- Unit converter
- JSON formatter and validator
- JWT decoder
- Unix timestamp converter
- Base64 encoder and decoder
- Encrypt and decrypt text or files with a password
- Hash generator (MD5, SHA-256, HMAC)
- Strong password generator
- Cron expression explainer
- Regex tester
- JSON to CSV converter (and CSV to JSON)