What URL decoding reveals
Percent encoding represents bytes as a percent sign followed by two hexadecimal digits. Decoding turns those bytes back into readable text when they form valid UTF-8. For example, a space is often written as %20, and an encoded plus sign is %2B. These sequences can appear in a path, a query value, or text that was itself placed inside another URL.
The important question is not just what a sequence means, but where it came from. A query value produced by a web form can interpret a literal plus differently from a general URL component. Keep a copy of the original input and choose the rule that matches its source. Decoding helps you inspect data; it is not decryption, and readable output is not automatically a safe link.
Read spaces and plus signs in context
Component mode uses JavaScript decodeURIComponent for one encoded component or value. It decodes percent escapes but leaves an unescaped + as a plus sign. Form value mode follows a different convention: it first interprets an unescaped plus as a space, then strictly decodes percent escapes. An encoded %2B remains a plus in both modes.
- Component:
red%20%2B%20bluebecomesred + blue. - Component:
a+b%2Bcbecomesa+b+c. - Form value:
a+b%2Bcbecomesa b+c.
Form value mode is for a single application/x-www-form-urlencoded value, not a promise to parse a complete query string. In that format a space is commonly encoded as +, while a literal plus is encoded as %2B. If you do not know how a value was created, compare the results and consult the source instead of assuming either one expresses the sender's intent.
Unicode, UTF-8, and decoding errors
A character outside basic ASCII often needs several UTF-8 bytes, so one visible character can correspond to several percent escapes. For example, caf%C3%A9 decodes to café, and %E4%B8%96%E7%95%8C decodes to 世界. Hexadecimal letters are case-insensitive, so %2b and %2B represent the same byte.
Strict decoding rejects a percent sign without two hexadecimal digits, such as %, %2, or %ZZ. It also rejects byte sequences that are not valid UTF-8. For instance, %E9 is a valid hexadecimal escape but not a complete UTF-8 encoding of é; UTF-8 encodes that character as %C3%A9. A legacy character set might use the byte differently, but guessing the character set can produce the wrong text.
When decoding fails, check whether the text was copied in full and whether every percent sign starts a complete escape. Then ask the source which character encoding was used. Preserve the original rather than deleting an escape or accepting replacement characters as the original data. Form value decoding is strict here too; it does not use the more forgiving recovery behavior of URLSearchParams for malformed input.
Investigate a possible extra layer
An encoded percent sign can make another escape visible after one pass. For example, %2520 decodes once to %20. A second, separately chosen component decoding pass would turn that result into a single space. This can happen when an encoded value is included inside another encoded value, but the same characters can also be intentional data.
Do not automatically decode repeatedly or assume every remaining percent sequence is a mistake. Compare each result with the source format and the expected value; stop if the visible %20 is meant to remain literal. Keep the previous version so you can reverse your decision. Similarly, encodeURI can turn an existing %20 into %2520; its appearance alone does not establish why the sequence is there.
Decode a value without changing the address
A complete URL has structural characters, including slashes, question marks, ampersands, and equals signs. An encoded version of one of those characters may be part of a value rather than a separator. Decoding the whole address as one component can turn data into URL structure and change how a server interprets it.
For example, component decoding changes https://example.com/a%2Fb?q=x%26y into https://example.com/a/b?q=x&y. The encoded slash now looks like a path separator, and the encoded ampersand can be read as a query separator. The result may point to a different resource or send different parameters. Keep the original address; treat the decoded text as an inspection result, not a replacement to open or share.
Full URI mode uses decodeURI, which preserves escapes for URI-reserved separators such as %2F and %26. It is useful for some inspection tasks, but it does not validate a destination or repair arbitrary URLs. Its encoding counterpart, encodeURI, cannot determine whether a raw separator belongs to a value. For a known parameter, identify and decode that value separately rather than converting the entire address as a component. Encoding an IPv6 host with encodeURI also escapes its square brackets, which can make the address invalid; inspect the original and output carefully.
Inspect links and protect sensitive data
A decoded address may expose a redirect target, but it does not tell you whether that target is trustworthy. Check the destination's domain and the context in which the link was received; look for unexpected hosts, misleading subdomains, or a redirect to a different site. Do not automatically visit an unfamiliar result. Decoding cannot detect every malicious link or reveal every redirect that might occur after a request.
The text you enter is processed locally in your browser. The website also uses analytics, and a visit can involve network requests separate from the decoding operation. See the privacy policy for details. Do not paste real access tokens, passwords, signed links, or other sensitive values. Use fictional examples when asking someone for help, and take care with copied output and screenshots.
Frequently asked questions
Why did a plus sign become a space?
In form value mode an unescaped plus represents a space. In component mode it remains a plus. If the original value contains a literal plus in form data, it should be represented as %2B. Choose the rule used by the producer rather than changing the output by hand.
Why does a valid-looking escape cause an error?
Two hexadecimal digits make an escape syntactically complete, but the resulting bytes must also form valid UTF-8. A truncated multibyte character or a value from a different character set can therefore fail. Check the source and character encoding before trying to recover the text.
Should I decode until no percent signs remain?
No. Percent signs can be part of the intended value, and another pass can change its meaning or introduce separators. Decode a further layer only when you understand why it exists and want to inspect it. Always retain the original, especially when a link is signed or used for navigation.
How do I encode a value instead?
Use the URL encoder for the reverse task, and choose the rule appropriate to that value. To remove recognized tracking parameters rather than decode text, visit the URL Cleaner home page. To split an address and inspect its query parameters, try the URL parser. Review any resulting link before sharing it.