← Back to all tools

🔗 URL Encoder/Decoder

Encode and decode URL components

About URL Encoder / Decoder

Encode and decode URL components instantly. Handle special characters and query strings. Free developer tool. This tool runs entirely in your browser — no data is sent to any server. It's fast, free, and works on any device.

How to Use the URL Encoder/Decoder

  1. Paste your text or URL-encoded string into the input field
  2. Choose encodeURIComponent for encoding query parameter values
  3. Choose encodeURI for encoding a full URL while preserving its structure
  4. Click Decode to convert percent-encoded strings back to readable text
  5. Use the Copy button to grab the result for use in your code

About URL Encoder/Decoder

URLs can only contain a limited set of safe ASCII characters. Special characters like spaces, ampersands, equals signs, and non-ASCII characters (like accented letters or Chinese characters) must be percent-encoded — replaced with a % followed by their hexadecimal byte values. For example, a space becomes %20, and the @ sign becomes %40. The distinction between encodeURI and encodeURIComponent matters: encodeURI encodes a complete URL, preserving slashes and colons, while encodeURIComponent encodes a component (like a query parameter value), encoding everything including those characters. This tool handles both use cases and the reverse decoding operation instantly.

Frequently Asked Questions

When should I use encodeURIComponent vs encodeURI?

Use encodeURIComponent for individual query parameter values, form data, or URL fragments. Use encodeURI when encoding a full URL — it preserves the structural characters like /, :, ?, and &.

What does %20 mean?

%20 is the percent-encoded representation of a space character. The '20' is the hexadecimal ASCII code for space. Similarly, %2F = /, %3D = =, and %26 = &.

Why do URLs need encoding?

URLs have a defined syntax where certain characters have special meaning (& separates parameters, = assigns values, # marks fragments). Encoding prevents ambiguity when data contains these characters.

Can I decode multiple times?

Yes! Sometimes URLs are double-encoded. Clicking Decode multiple times will strip each encoding layer. Watch for errors if you decode a non-encoded string.

Does this handle Unicode characters?

Yes. Non-ASCII characters are first converted to UTF-8 bytes, then each byte is percent-encoded. For example, the character é becomes %C3%A9.

Related Tools

Base64 Encoder/Decoder → Hash Generator → Text to URL Slug → HTML Entity Encoder →