URL Encode / Decode
Encode or decode URL components with percent-encoding.
Runs in your browser All processing happens locally. Your data never leaves this device.
Overview
URLs may only contain a limited set of ASCII characters. Percent-encoding (URL
encoding) represents any other byte as % followed by two hex digits, so spaces,
non-ASCII text, and reserved characters can travel safely in a URL. This tool
encodes and decodes text locally.
How to use
- Choose Encode or Decode.
- Toggle Whole URI to switch between
encodeURIComponent(a single value) andencodeURI(a full URL). - Type or paste your input; the result updates instantly.
Examples
a b&c=1→a%20b%26c%3D1(component)café→caf%C3%A9(UTF-8 bytes, percent-encoded)
FAQ
- What is the difference between encodeURIComponent and encodeURI?
- encodeURIComponent escapes everything that is not a URL-safe character, so it is correct for a single query value or path segment. encodeURI leaves characters that are legal in a full URL (colon, slash, question mark, ampersand) unescaped, so it is for encoding a whole URL. Use the Whole URI toggle to switch.
- Is my input sent anywhere?
- No. Encoding and decoding run in your browser using the built-in encodeURIComponent/decodeURIComponent functions. Nothing is uploaded.
- Why did decoding fail?
- Decoding fails on malformed percent sequences (for example a lone % or %ZZ). Check that every % is followed by two hexadecimal digits.