URL Encoder / Decoder

Encode or decode a URL or URL component. Component mode encodes all special characters (including /, ?, &). Full URL mode preserves the URL structure.

Encoded output

Advertisement

Frequently Asked Questions

What is the difference between URL encoding and component encoding?

Full URL encoding (encodeURI) encodes only characters that are illegal in a URI, preserving structural characters like /, ?, &, and =. Component encoding (encodeURIComponent) encodes everything except letters, digits, and - _ . ! ~ * ' ( ), making it safe for encoding individual query string values.

When should I use component encoding vs. full URL encoding?

Use component encoding when encoding a single query parameter value — for example, a search term that might contain & or =. Use full URL encoding when you want to encode an entire URL while keeping its structure intact.

What does %20 mean?

% followed by two hex digits is a percent-encoded byte. %20 is the ASCII space character (decimal 32, hex 20). Browsers also accept + as a space in query strings, but %20 is the standard form.