URL Encoder/Decoder
Encode and decode URL parameters and strings
Encodes a URL component. Decoding preserves + as a literal plus; spaces encode as %20.
Processed on this device. Your text is not uploaded.
Quick examples
About URL encoding
Percent-encoding represents characters as UTF-8 bytes written as %XX. Encode individual parameter values before composing a URL; encoding a whole URL also escapes its separators.
About URL Encoder & Decoder
Our free URL encoder and decoder tool converts special characters in URLs to their percent-encoded equivalents and back again. Encode a query string with spaces and ampersands before it breaks an API call, or decode a %20-filled redirect URL to read it, and you get URL encoding that complies with RFC 3986 standards.
Percent-encoding (also known as URL encoding) replaces unsafe ASCII characters with a percent sign followed by two hexadecimal digits. For example, a space becomes %20, an ampersand becomes %26, and non-ASCII characters are encoded using their UTF-8 byte sequences. This process is essential for transmitting data reliably in URLs, form submissions, and HTTP requests.
Nothing you enter is ever sent to us or stored, which makes our online URL encoder completely private and secure for encoding sensitive parameters, authentication tokens, or any text that needs to be safely included in a URL.
Key Features
- Simultaneous URL encoding and decoding in real time
- RFC 3986 compliant percent-encoding for all characters
- Full Unicode and UTF-8 character support
- Instant conversion as you type with zero delay
- One-click copy to clipboard for encoded or decoded output
- Built-in examples for URLs, query strings, and special characters
- Safe characters (A-Z, a-z, 0-9, -, _, ., ~) are preserved automatically
- Your input is never uploaded or stored
- Clear all button to reset inputs and outputs instantly
- Dark mode support for comfortable use in any environment
How to Use the URL Encoder
- Enter your text: Type or paste a URL, query parameter, or any text into the input field at the top of the tool.
- View encoded output: The URL-encoded version appears instantly in the left output panel, with all special characters converted to percent-encoded format.
- View decoded output: If you paste an already-encoded string, the right panel shows the decoded, human-readable version.
- Copy the result: Click the Copy button next to either output to copy the encoded or decoded text to your clipboard.
- Try an example: Click any of the pre-built examples below the output to quickly see how different inputs are encoded.
- Clear and start over: Use the Clear All button to reset all fields and begin a new encoding session.
Use Cases
- API Development: Encode query parameters and path segments before sending HTTP requests to REST or GraphQL APIs.
- Form Data Handling: Ensure form field values with special characters are properly encoded for POST and GET submissions.
- Redirect URLs: Encode callback and redirect URLs that contain nested query strings or fragment identifiers.
- SEO & Analytics: Decode tracking URLs to inspect UTM parameters, campaign tags, and referrer data.
- Email Templates: Encode mailto links and subject lines that contain spaces, ampersands, or other reserved characters.
- Debugging: Decode percent-encoded URLs from server logs, browser developer tools, or error messages to understand the original request.
- Internationalization: Encode non-ASCII characters such as accented letters, CJK characters, or emoji for safe inclusion in URLs.
- Security Testing: Verify that your application properly handles encoded and double-encoded input to prevent injection vulnerabilities.
Frequently Asked Questions
What is URL encoding?
URL encoding (percent-encoding) converts characters that are not allowed in a URL into a universally accepted format using a percent sign followed by two hexadecimal digits. This ensures URLs are transmitted correctly across the internet.
When should I use URL encoding?
You should encode any value that will be placed in a URL query string, path segment, or fragment identifier if it contains reserved characters like spaces, ampersands, equal signs, question marks, or non-ASCII characters.
What is the difference between encodeURI and encodeURIComponent?
encodeURI encodes a full URI but preserves characters like colons, slashes, and question marks that have special meaning in URLs. encodeURIComponent encodes individual components such as query parameters, escaping all reserved characters. This tool uses encodeURIComponent for maximum safety.
Can I encode entire URLs or just parameters?
You can encode any text. However, for full URLs you typically want to encode only the parameter values rather than the entire URL structure. Encoding the full URL would also encode the protocol (://), path separators (/), and query delimiters (?/&), which would break the URL.
Tips & Best Practices
- Encode values, not keys: When building query strings, encode only the parameter values, not the entire key=value pair or URL structure.
- Avoid double encoding: If your text is already encoded (contains %20, %26, etc.), decoding it first before re-encoding prevents double percent-encoding issues.
- Use the decoded view for debugging: Paste a URL from browser logs or network tools into the input to see the decoded, human-readable version instantly.
- Test with special characters: Try inputs with ampersands (&), plus signs (+), hash symbols (#), and Unicode characters to ensure your application handles all edge cases.
- Check the examples: The built-in examples cover common scenarios like URLs with query parameters, special characters, and email addresses to help you understand encoding behavior.
- Remember safe characters: Letters (A-Z, a-z), digits (0-9), hyphens (-), underscores (_), periods (.), and tildes (~) do not need encoding and are left unchanged.