URL Encoder/Decoder

URL Encoder/Decoder
Input: 0 Output: 0 Encoded chars: 0
URL Encoding Guide

URL encoding converts special characters into percent-encoded format (%XX) for safe transmission in URLs.

Common Encodings:
Space%20 or +
!%21
"%22
#%23
%%25
&%26
+%2B
=%3D
?%3F
Use Cases
  • Query Parameters - Safe parameter values
  • API Requests - Encode data for URLs
  • Form Submissions - POST data encoding
  • Link Generation - Dynamic URL creation
  • Analytics - Track encoded parameters
Encoding Types

Standard: Encodes spaces as + and most special characters

Component: Encodes all special characters including / ? : @ & = + $ ,

Percent-Encoding in Practice

URL encoding replaces characters that carry special meaning in a URL with %XX hex sequences - a space becomes %20, an ampersand inside a query value becomes %26. Skip it and the URL either breaks or silently truncates at the first reserved character. The full character tables and the edge cases are in the URL encoding guide.

The tool offers two modes because JavaScript does: encodeURI keeps URL structure (slashes, question marks) intact and suits a complete address, while encodeURIComponent encodes everything and is what you want for individual query parameters. The most common bug in the wild is double-encoding - %20 turning into %2520 - which means two layers of your stack each encoded the same value.

URL Encoding Questions

URLs can only contain certain characters safely. Spaces, &, =, non-ASCII text - all need to be escaped as %XX hex codes. Otherwise browsers and servers might misinterpret your data.

Spaces (→%20), ampersands (→%26), equals signs in values (→%3D), question marks, hashes, and anything non-ASCII. Basically, if it has meaning in URL syntax or isn't plain ASCII, encode it.

encodeURI leaves URL-meaningful characters alone (/, ?, &). encodeURIComponent escapes everything except alphanumerics. Use encodeURIComponent for parameter values, encodeURI for full URLs. This tool does the parameter-safe version.

When displaying URLs to users, parsing query strings on the server, or debugging why your parameter looks like gibberish. The encoded form is for machines; decode it for humans.