URL Encoder/Decoder | CoderTools
Convert text to URL-safe format or decode URL-encoded strings
About URL Encoding
URL encoding, also known as percent encoding, is a mechanism to encode information in a Uniform Resource Identifier (URI) under certain circumstances. It consists of substituting certain characters with one or more character triplets that consist of the percent character '%' followed by two hexadecimal digits.
URL encoding is necessary when a URL contains characters that are not allowed in URLs, or when characters have special meaning in URL syntax. This ensures that URLs can be safely transmitted over the internet regardless of the characters they contain.
Note: Different parts of a URL (scheme, authority, path, query, fragment) have different encoding rules. This tool uses standard URL encoding suitable for query parameters and form data.
Common Characters and Their Encodings
| Character | URL Encoded | Convert text to URL-safe format or decode URL-encoded strings |
|---|---|---|
| Space | %20 | Space character |
| ! | %21 | Exclamation mark |
| " | %22 | Quotation mark |
| # | %23 | Hash/Fragment identifier |
| % | %25 | Percent character |
| & | %26 | Ampersand/Query separator |
| + | %2B | Plus sign |
| = | %3D | Equals sign/Query value separator |
| ? | %3F | Question mark/Query indicator |
Common Use Cases
- Encoding query parameters in web forms
- Handling special characters in API requests
- Processing file names with special characters in URLs
- Encoding email addresses and other data in URLs
- Debugging web applications and API calls
Examples
Example 1: Query Parameter
Original: Hello World!
Encoded: Hello%20World%21
Example 2: Email Address
Original: user@example.com
Encoded: user%40example.com
Example 3: Complex Query
Original: search=JavaScript & Node.js
Encoded: search%3DJavaScript%20%26%20Node.js
References and Further Reading
- RFC 3986 - Uniform Resource Identifier (URI): Generic Syntax
- Wikipedia: Percent Encoding
- MDN: encodeURIComponent()
Related Tools
Base64 Encoder/Decoder
Quickly encode and decode Base64 strings, supporting both text and file conversion
HTML Encoder/Decoder
Convert special characters to HTML entities with named, decimal, and hexadecimal formats to prevent XSS attacks
JWT Encoder/Decoder
Decode, verify, and generate JSON Web Tokens with support for multiple signing algorithms
Escape/Unescape Tool
Escape and unescape strings between multiple formats including JavaScript, JSON, HTML, XML, CSV, SQL and more
QR Code Generator
Generate custom QR codes for text, URL, WiFi, vCard, email, SMS and more
Text Encoding Converter
Convert text between Hex, Binary, Unicode, ASCII, Base64, and many other encoding formats