What this tool does
URLs can only contain a limited set of characters. Percent-encoding (also called URL encoding) replaces unsafe or reserved characters with a % followed by two hexadecimal digits. For example, a space becomes %20 and an ampersand becomes %26. This tool encodes text into that form and decodes it back.
Component vs. full URL
- Component mode (
encodeURIComponent) encodes everything that isn’t safe — including/ ? & = #. Use it for a single query-parameter value, so those characters don’t break the URL structure. - Full URL mode (
encodeURI) leaves reserved characters intact so a complete address likehttps://site.com/path?a=1keeps working. Use it when encoding an entire URL.
Example
The value name=John & Jane in component mode becomes name%3DJohn%20%26%20Jane. Decoding returns the original text.
Limitations
- Choosing the wrong mode is the most common mistake: full-URL mode will not encode
&or=, which can corrupt a query value that contains them. - Decoding malformed input (for example a lone
%or%2) will fail because it is not valid percent-encoding.
How to fix common problems
- “URI malformed” on decode: the text contains an invalid
%sequence. Remove or correct it, or re-copy the original string. - Query value breaks the URL: switch to Component mode so special characters are fully encoded.
- Plus signs not decoding to spaces: in query strings,
+can mean a space. This tool follows standard percent-encoding; replace+with a space manually if the source used that convention.