What URL encoding (percent-encoding) does
A URL may only contain a limited set of characters. Letters, digits and - . _ ~ are always safe. Characters such as ? & = # / have a special meaning: they separate the path, the query and the fragment. Everything else — spaces, Hindi, the rupee sign, emoji, quotes — must be written as bytes in the form %XX, where XX is the hexadecimal value of each byte. That is percent-encoding, defined in RFC 3986. A space becomes %20, & becomes %26 and ₹ becomes %E2%82%B9, because it takes three bytes in UTF-8.
Decoding reverses the process. This page does both instantly in your browser. Your URLs never leave your device. That matters because URLs often carry session tokens, e-mail addresses, password-reset codes and API keys.
Component vs full URL: the mistake that breaks links
Most broken links come from choosing the wrong kind of encoding. This tool offers five modes and says what each is for:
| Mode | Leaves unencoded | Use it for |
|---|---|---|
Component (encodeURIComponent) | A–Z a–z 0–9 - _ . ! ~ * ' ( ) | One query value or one path segment, for example a search term or a redirect URL inside ?next= |
Full URL (encodeURI) | The above plus ; , / ? : @ & = + $ # | A whole URL that already has its structure but contains spaces or non-English characters |
| HTML form | A–Z a–z 0–9 * - . _; space becomes + | POST bodies and query strings built like a browser form (application/x-www-form-urlencoded) |
| RFC 3986 strict | Only A–Z a–z 0–9 - . _ ~ | OAuth 1.0 signatures, AWS SigV4 canonical requests, anything that compares encoded strings byte for byte |
| Path | Strict, but keeps / | File paths such as /files/my report (final).pdf |
Rule of thumb: if you are putting a value into a URL, use Component. If you have a complete URL that just needs its spaces and Unicode fixed, use Full URL. Using Full URL on a value is the classic bug. A value like a&b=c passes through unchanged and silently creates an extra parameter.
How to use the decoder
- Choose Decode and paste the encoded text or URL. The result updates as you type.
- Decode + as space is on by default, because form-encoded query strings use
+for spaces. Turn it off when a literal plus sign matters, for example in a Base64 value or a phone number such as+91inside a path. - If the output still contains
%XXsequences, the text was encoded twice. That happens when a URL is passed through two systems, such as a tracking link inside an e-mail. Press Decode fully to peel all layers off at once; the status line tells you how many layers there were. - Malformed input does not crash the tool. A stray
%or a byte that is not valid UTF-8 is kept as it is, and the status line shows exactly which sequence is wrong and at which character position. In comparison, the browser's owndecodeURIComponentthrows “URI malformed” and gives you nothing.
The query-string editor
Paste any full URL and the lower panel splits it into protocol, host, port, path and fragment, and lists every query parameter in a table with the decoded key and value. You can then:
- Edit any key or value in plain text. The URL is rebuilt with correct encoding as you type, so you never hand-type
%20again. - Add or remove parameters, for example to add UTM tags to a campaign link or drop a parameter that breaks a page.
- Remove tracking in one click. This strips
utm_*,fbclid,gclid,msclkid,igshidand similar click IDs before you share a link. Shorter, cleaner links look more trustworthy and do not leak where you found them. - Choose form encoding (space as
+) or RFC 3986 (space as%20) for the rebuilt URL, and copy the parameters as JSON for use in code, Postman or a bug report. Repeated keys such astag=a&tag=bbecome an array.
Why this tool instead of the usual encoder sites
- The best-known encoder sites offer one encoding mode and a file-upload form. They do not explain the difference between component and full-URL encoding, which is the main cause of broken links.
- They decode with functions that fail completely on one bad byte. This tool decodes everything that is valid, keeps what is not, and points to the problem.
- No other mainstream page combines encode, decode, multi-layer decoding, URL parsing and an editable parameter table, while working offline and keeping your data on your device.
Common examples
| Text | Component | Form |
|---|---|---|
hello world | hello%20world | hello+world |
a&b=c | a%26b%3Dc | a%26b%3Dc |
₹500 | %E2%82%B9500 | %E2%82%B9500 |
नमस्ते | %E0%A4%A8%E0%A4%AE%E0%A4%B8%E0%A5%8D%E0%A4%A4%E0%A5%87 | same |
it's (ok)! | it's%20(ok)! | it%27s+%28ok%29%21 |
Everyday links that need correct encoding
- WhatsApp click-to-chat: in
https://wa.me/919876543210?text=…the message must be Component-encoded. A raw&or#cuts your message short, and new lines must become%0A. - UPI payment links: in
upi://pay?pa=shop@okaxis&pn=Sharma%20Store&am=150.00the payee name and note are encoded values. An unencoded space or&in a shop name makes some apps reject the link. - Google Forms pre-filled links and mailto: links with a subject and body work the same way: encode each value, never the whole link.
- Redirects after login (
?next=/orders?id=5) must encode the inner URL, otherwise its?and&are read as part of the outer URL.
Paste any of these into the decoder to check what the receiving app will actually see, and use the table to fix a single value safely.
Tips for developers
- Encode each value separately, then join with
&and=. Never encode a whole query string at once. - In JavaScript,
URLSearchParamshandles form encoding for you. In Python, useurllib.parse.quote(RFC 3986 style,safe=''for components) orurlencode(form style). In PHP,rawurlencodeis RFC 3986 andurlencodeis the form style with+. - Domain names are not percent-encoded. Internationalised domains use Punycode (
xn--), which the browser converts automatically. The URL parts panel shows the host as the browser sees it. - Encoding is not escaping for HTML. A URL placed inside an HTML attribute also needs
&written as&in HTML source.
Sources and standards
- RFC 3986 — Uniform Resource Identifier (URI): Generic Syntax (IETF, STD 66): reserved and unreserved characters, percent-encoding (section 2).
- WHATWG URL Standard: how browsers actually parse URLs, the percent-encode sets and the
application/x-www-form-urlencodedformat. - MDN — encodeURIComponent() and encodeURI(): which characters each function leaves alone.
- RFC 3629 — UTF-8: why “₹” becomes
%E2%82%B9(three bytes).
Frequently asked questions
What is the difference between encodeURI and encodeURIComponent?
encodeURI keeps the characters that give a URL its structure (: / ? # & = and others), so it is for complete URLs. encodeURIComponent encodes those too, so it is for a single value placed inside a URL. Using encodeURI on a value is a common bug.
Should a space be %20 or +?
Both are correct in different places. In paths and in RFC 3986 encoding a space is %20. In HTML form data (application/x-www-form-urlencoded), which most query strings follow, a space is +. When decoding, this tool treats + as a space by default; you can switch that off.
Why does my URL still contain %25 after decoding?
%25 is an encoded percent sign, which means the text was encoded twice. Press “Decode fully” to remove all layers at once.
How do I encode Hindi or the rupee symbol in a URL?
Use Component mode. Each character is converted to its UTF-8 bytes and every byte is written as %XX, so ₹ becomes %E2%82%B9 and न becomes %E0%A4%A8.
Can I edit query parameters without hand-encoding?
Yes. Paste a full URL and edit keys and values as plain text in the table. The URL is rebuilt with the correct encoding, and you can remove tracking parameters in one click.
Is my URL sent to a server?
No. Encoding, decoding and parsing all happen in your browser, and the page works offline after it loads.
Why does decodeURIComponent say “URI malformed”?
The input has a % not followed by two hex digits, or bytes that are not valid UTF-8. This tool decodes the valid parts, keeps the bad sequence as it is and shows its position.