🔗 URL Encoder & Decoder Tool

Convert text to and from URL-encoded format (percent encoding) with advanced options and real-time processing.

URL Encoding Tool

Encode special characters for safe URL transmission or decode URL-encoded strings back to readable text.

📤 Input Text (0)
📥 Output Text (0)

🎯 What is URL Encoding?

URL encoding, also known as percent encoding, is a mechanism for encoding information in a Uniform Resource Identifier (URI). It converts characters into a format that can be transmitted over the Internet by replacing unsafe ASCII characters with a "%" followed by two hexadecimal digits.

This encoding method is essential because URLs can only contain a limited set of characters from the ASCII character set. Any characters outside this set, or characters that have special meaning in URLs, must be encoded to ensure proper transmission and interpretation.

🔧 Common Use Cases

Query ParametersSafely pass data through URL parameters.
Form Data SubmissionsHandle user input in web forms.
API Request FormattingStructure REST API calls correctly.
Special Characters in FilenamesEncode filenames for web access.

📊 Common URL-Encoded Characters Reference

CharacterDescriptionURL Encoded
(space)Space%20 or +
!Exclamation mark%21
"Double quote%22
#Hash/Pound%23
$Dollar sign%24
%Percent%25
&Ampersand%26
'Single quote%27
+Plus sign%2B
,Comma%2C
/Forward slash%2F
:Colon%3A
;Semicolon%3B
=Equals%3D
?Question mark%3F
@At sign%40

❓ Frequently Asked Questions

What is URL encoding and why is it needed?+

URL encoding converts characters into a format that can be safely transmitted over the Internet. URLs can only be sent using the ASCII character set, so characters outside this set must be encoded. Additionally, certain ASCII characters have special meaning in URLs (like ?, &, =) and must be encoded when used as data rather than syntax. URL encoding replaces these characters with a % followed by two hexadecimal digits representing the character's ASCII code.

What's the difference between %20 and + for spaces?+

Both %20 and + can represent spaces in URLs, but they're used in different contexts. The + sign is used in query strings and form data (application/x-www-form-urlencoded), while %20 is the standard percent encoding used in all other parts of a URL. Modern applications typically use %20 for consistency. In path components of URLs, only %20 is valid, while in query strings both are acceptable, though %20 is more universal.

Which characters need to be URL encoded?+

Characters that must be encoded include: 1) Reserved characters with special meaning (: / ? # [ ] @ ! $ & ' ( ) * + , ; =), 2) Unsafe characters like spaces, quotes, <, >, #, %, {, }, |, \, ^, ~, [, ], and `, and 3) Non-ASCII characters (accented letters, Chinese characters, emojis, etc.). Alphanumeric characters (A-Z, a-z, 0-9) and unreserved characters (- _ . ~) generally don't need encoding.

What's the difference between encodeURI() and encodeURIComponent()?+

encodeURI() is designed to encode a complete URI and doesn't encode characters that have special meaning in URIs (like :, /, ?, &). It's used when you want to encode an entire URL while preserving its structure. encodeURIComponent() encodes everything except unreserved characters (A-Z, a-z, 0-9, -, _, ., ~) and is used for encoding individual URI components like query parameters. For most use cases where you're encoding user input or data to be placed in a URL, encodeURIComponent() is the safer choice.

How does URL encoding handle Unicode characters?+

URL encoding handles Unicode characters by first encoding them in UTF-8, then percent-encoding each byte. For example, the Chinese character "中" (U+4E2D) is encoded in UTF-8 as three bytes (E4 B8 AD), which becomes %E4%B8%AD in URL encoding. This ensures that any character from any language can be safely transmitted in a URL.