🔗 URL Encoder & Decoder

Percent-encode text for safe use in URLs, or decode encoded strings back to plain text. Supports both encodeURIComponent (query values) and encodeURI (full URLs) modes.

Encode & Decode encodeURIComponent Instant
Plain Text Input
Encoded Output

FAQ

What is URL encoding (percent encoding)?

URL encoding converts characters not allowed in URLs into a %XX format, where XX is the hexadecimal UTF-8 byte value. A space becomes %20, # becomes %23, and so on. This ensures the URL is valid and unambiguous across all systems.

What is the difference between encodeURIComponent and encodeURI?

encodeURIComponent encodes everything except A–Z a–z 0–9 - _ . ! ~ * ' ( ). Use it for individual query parameter values (e.g. q=hello+world). encodeURI also preserves characters that have structural meaning in URIs (: / ? # [ ] @ ! $ & ' ( ) * + , ; =), so it safely encodes a complete URL without breaking its structure.

When should I use URL encoding?

Always encode query parameter values before appending them to a URL. Common cases: search queries with spaces or special characters, file paths, email addresses in mailto links, and data embedded in href attributes.

Is my data sent to a server?

No. All encoding and decoding uses the browser's built-in encodeURIComponent(), encodeURI(), decodeURIComponent(), and decodeURI() functions. Nothing leaves your device.