Utilix

Developer tools · Encoding

URL Encoder / Decoder

Encode or decode URL strings online. Supports encodeURIComponent for query parameters and encodeURI for full URLs. Free, instant, and handles UTF-8 characters correctly.

Enter values above to see the result.

How it works

Encodes or decodes URL strings using either encodeURIComponent (for query parameters) or encodeURI (for full URLs). Handles UTF-8 characters correctly.

Step by step

  1. 1Choose Encode or Decode mode.
  2. 2Select Component scope for query parameters; Full URI for complete URLs.
  3. 3encodeURIComponent encodes all characters except letters, digits, and - _ . ! ~ * ' ( ).
  4. 4encodeURI preserves characters that have special meaning in a URL path.

Examples

Encode query parameter

Spaces become %20, & becomes %26, = becomes %3D.

Inputs

mode:
encode
scope:
component
input:
hello world & foo=bar

Result

output:
hello%20world%20%26%20foo%3Dbar

Decode URL component

%20 → space, %26 → &, %3D → =.

Inputs

mode:
decode
scope:
component
input:
hello%20world%20%26%20foo%3Dbar

Result

output:
hello world & foo=bar

Frequently asked questions

When should I use encodeURIComponent vs encodeURI?

Use encodeURIComponent for individual query parameter values — it encodes &, =, ?, /, and other URL structural characters. Use encodeURI for a full URL where you want to preserve the URL structure but encode spaces and non-ASCII characters.

Why does space become %20 instead of +?

In standard percent-encoding (RFC 3986) spaces are encoded as %20. The + notation is used only in application/x-www-form-urlencoded content type, which is different from URL encoding.