URL Encoder / Decoder

Encode text to percent-encoded URL format or decode URL-encoded strings back to plain text.

Common encodings

space%20
&%26
=%3D
+%2B
/%2F
?%3F
#%23
@%40

Frequently Asked Questions

What is percent encoding in URLs?+

Percent encoding (also called URL encoding) replaces characters that are not safe in a URL with a % followed by two hex digits representing the byte value. For example, a space becomes %20. This ensures URLs contain only safe ASCII characters that all network systems can handle.

What's the difference between encodeURIComponent and encodeURI?+

encodeURIComponent encodes almost everything, including / ? # & =, making it safe for encoding individual query parameter values. encodeURI leaves URL structural characters like / ? # intact, so it is suitable for encoding a complete URL. This tool uses encodeURIComponent.

Why does a space encode to %20 and not +?+

Both are valid in different contexts. + for spaces is the "application/x-www-form-urlencoded" form encoding used by HTML forms. %20 is the standard percent encoding used in the URL path and in encodeURIComponent. This tool uses %20, which is correct for query string values passed as part of a URL.

When do I need to URL encode a string?+

Any time you build a URL by concatenating user-supplied or dynamic data into a query string or path, that data must be URL encoded. For example, a search query containing spaces or special characters must be encoded before being appended as ?q=.... JavaScript's URLSearchParams handles this automatically when constructing URLs programmatically.

How to use

  • Type or paste plain text on the left to get the URL-encoded version.
  • Paste a URL-encoded string on the right to decode it back to plain text.
  • Uses encodeURIComponent / decodeURIComponent — encodes all characters except A–Z a–z 0–9 - _ . ! ~ * ' ( ).
  • Useful for encoding query string values, form data, and non-ASCII characters in URLs.