&.+. When decoding, + becomes a space.How to use
Use this tool to encode/decode and quickly spot encoding problems.
- Paste text into the input box.
- Select Component for query values or Full URL for complete URLs.
- Optionally enable Treat + as space if your input/output is form-encoded.
- Click Encode, Decode, or Check to validate percent-encoding and see diagnostics.
FAQ
What’s the difference between encodeURIComponent and encodeURI?
encodeURIComponent encodes reserved characters and is best for individual query values; encodeURI keeps URL structure characters like :/?&=# for full URLs.
Why does + sometimes mean a space?
In application/x-www-form-urlencoded (HTML forms), spaces are often encoded as +; in general URL percent-encoding, spaces are usually %20.
How do I know if my string is valid URL-encoded?
Every % must be followed by exactly two hex digits (0-9, A-F). The Check button highlights the first invalid escape.
Why does decodeURIComponent fail sometimes?
It throws an error when the input has malformed percent escapes (like %2G) or incomplete sequences (like a trailing %).
Is it safe to encode an entire URL with encodeURIComponent?
Usually no—encoding a full URL will also encode : and /, which changes the URL. Use encodeURI for a full URL and encodeURIComponent for parts.
How can I avoid double-encoding?
Only encode raw text once; if you receive an already-encoded value, decode it first, then re-encode in the correct mode.
Does this tool send my input to a server?
No. The encoding/decoding and checks run locally in your browser.