URL Encode & Decode Tool
How the URL Encoder Decoder Works
URLs (Uniform Resource Locators) can only contain a limited set of characters from the US-ASCII character set. These include alphanumeric characters (digits 0-9, letters A-Z and a-z), and a few special characters like hyphens, underscores, dots, and tildes. Any other character must be encoded to be transmitted safely over the Internet.
What is Percent-Encoding?
The mechanism used for this conversion is known as Percent-Encoding. Unsafe characters are replaced with a \% followed by two hexadecimal digits that represent the character's ASCII code.
The formula for encoding a character is generally represented as:
Where X and Y are the hexadecimal digits corresponding to the byte value of the character.
Common Encoding Examples
Below are some frequently encountered characters and their encoded equivalents:
- Space: \%20 (or + in some contexts)
- Slash (/): \%2F
- Question Mark (?): \%3F
- Colon (:): \%3A
- At Symbol (@): \%40
When to Encode vs. Decode?
- Encode: Use this when you have text containing special characters (like spaces, emojis, or foreign language characters) that needs to be included as a parameter in a URL string.
- Decode: Use this when you have a URL that looks like "gibberish" (full of % signs) and you need to read the actual content or parameters within it.