URL Encoder/Decoder

URL encoding converts special characters to percent-encoded format for safe transmission in URLs. Space becomes %20, & becomes %26, = becomes %3D. Characters A-Z, a-z, 0-9, and -_.~ do not need encoding.

Encode text for URLs or decode URL-encoded strings. Supports encodeURIComponent and encodeURI methods.

Text to Encode

Encoded Result

Common URL Encodings

CharacterEncodedDescription
(space)%20Space character
!%21Exclamation
#%23Hash
&%26Ampersand
=%3DEquals
?%3FQuestion mark

encodeURIComponent vs encodeURI

  • encodeURIComponent: Encodes all special characters. Use for query parameters.
  • encodeURI: Preserves :, /, ?, #, etc. Use for full URLs.

How to Use

  1. Enter your value in the input field
  2. Click the Calculate/Convert button
  3. Copy the result to your clipboard

Frequently Asked Questions

What is URL encoding?
URL encoding (percent-encoding) converts characters into a format safe for URLs. Special characters are replaced with %XX where XX is the hexadecimal ASCII value. Space becomes %20 or +, & becomes %26, = becomes %3D. This prevents characters from being misinterpreted as URL delimiters.
Which characters need to be URL encoded?
Reserved characters must be encoded when used as data: ? # / : @ & = + $ , ; % and space. Unreserved characters (A-Z, a-z, 0-9, - _ . ~) don't need encoding. Non-ASCII characters (accents, emoji, Chinese) must always be encoded.
What is the difference between encodeURI and encodeURIComponent?
encodeURI encodes a full URL, preserving characters like :/?#[]@ that have meaning in URLs. encodeURIComponent encodes everything except A-Za-z0-9-_.~, used for query parameter values. Use encodeURIComponent for user input in URLs.
Why do I see %20 or + for spaces in URLs?
%20 is the standard URL encoding for space. + is an alternate encoding used specifically in query strings (application/x-www-form-urlencoded). In path segments, always use %20. In form data, + is common. Modern APIs typically use %20 everywhere.
How do I decode a URL-encoded string?
Replace %XX with the character having that hexadecimal ASCII code. %20 = space (hex 20 = decimal 32 = space). %3D = equals sign. Most programming languages have built-in functions: JavaScript decodeURIComponent(), Python urllib.parse.unquote().

Related Tools