Skip to main content
Back to tools

URL Encoder

Encode and decode URL components

About URL Encoder

URL Encoder lets you encode and decode url components.

Category: API.

Frequently asked questions

When do I need to URL-encode?

Whenever you include special characters in a URL — spaces, &, =, +, #, ?, /, etc. These characters have special meaning in URL syntax and must be percent-encoded to be treated as literal values.

What's the difference between encodeURI and encodeURIComponent?

encodeURI preserves characters with structural meaning in URLs (/, ?, #, &). encodeURIComponent encodes everything except letters, digits, and - _ . ! ~ * ' ( ) — use it for individual query parameter values.

Why does space become %20 or +?

%20 is the standard RFC 3986 percent-encoding. The + form is used in application/x-www-form-urlencoded (HTML form submissions). Both are accepted in query strings but %20 is safer in path segments.

Related tools