Encode or decode URL components. Required for building safe URLs with special characters.
Web ยท percent-encoding ยท query strings
URL-encode and decode strings for query parameters, path segments, and form bodies. Percent-encoding runs in your browser so you can safely prepare values that contain spaces, unicode, or reserved characters.
URLs can only reliably carry a limited character set in certain components. Spaces, &, =, non-ASCII text, and other reserved characters must be percent-encoded (e.g. space โ %20 or + in some form encodings). Decoding reverses the process for readability.
| API / concept | Typical use |
|---|---|
encodeURIComponent | Query values & path segments (encodes &, =, etc.) |
encodeURI | Whole URLs โ leaves structural characters |
| application/x-www-form-urlencoded | Forms; spaces often become + |
Rule of thumb: When building ?q=โฆ values, use component encoding. Double-encoding (%2520) usually means something encoded twice by accident.
Raw: hello world & friends
Encoded: hello%20world%20%26%20friends
Raw: cafรฉ
Encoded: caf%C3%A9
https:// structure.& inside a value split query parameters.No. Base64 is a different encoding for arbitrary bytes as text. Use the Base64 tool for that.
No โ encode/decode are local. Privacy Policy.
Malformed % sequences (e.g. truncated %C3) throw errors. Check the source for cut-off copies.