URL Encoder / Decoder
Encode or decode URLs and query strings online. Convert special characters to percent-encoding instantly. Free URL encoder decoder for developers.
How to Use URL Encoder / Decoder
- 1Paste your URL or query string into the Input panel.
- 2Select the encoding mode: Component (encodes all special chars) or Full URL (preserves URL structure).
- 3Click Encode URL to percent-encode the input.
- 4Click Decode URL to convert percent-encoded text back to readable form.
- 5Use the ⇅ Swap button to move the result to input for chaining operations.
About URL Encoder / Decoder
The URL Encoder/Decoder tool encodes unsafe characters in URLs to their percent-encoded equivalents (e.g., spaces become %20) and decodes percent-encoded URLs back to human-readable text. It is an essential utility for web developers handling query parameters, building API requests, or debugging URL-related issues in web applications.
How URL Encoder / Decoder Works
URLs (Uniform Resource Locators) are specified in RFC 3986 and can only contain a defined set of "unreserved" characters: letters A–Z and a–z, digits 0–9, and four symbols: hyphen (-), underscore (_), tilde (~), and period (.). All other characters must be percent-encoded: represented as a percent sign followed by two hexadecimal digits that specify the character's byte value in UTF-8. For example, a space becomes %20, an ampersand becomes %26, and a pound sign becomes %23. Certain characters like slash (/), question mark (?), and equals (=) are "reserved" — they have structural meaning in URLs — and whether you encode them depends on context. Component encoding (encodeURIComponent in JavaScript) encodes everything except the unreserved characters, including the reserved ones. Full URL encoding (encodeURI) preserves the reserved characters since they are structural. Our tool supports both modes and also handles the legacy + = space encoding used in HTML form submissions (application/x-www-form-urlencoded).
Reference Data
Common URL-Encoded Characters
| Character | Encoded Form | Notes |
|---|---|---|
| Space | %20 or + | + is only valid in query strings (form encoding) |
| ! | %21 | Unreserved in RFC 3986 — encoding is optional |
| " | %22 | Must be encoded in query strings |
| # | %23 | Reserved — marks fragment identifier |
| $ | %24 | Reserved |
| & | %26 | Reserved — separates query parameters |
| ' | %27 | Unreserved — encoding is optional |
| ( | %28 | Unreserved — encoding is optional |
| ) | %29 | Unreserved — encoding is optional |
| + | %2B | Must encode if value contains literal + |
| / | %2F | Reserved — separates path segments |
| : | %3A | Reserved — separates scheme from host |
| = | %3D | Reserved — separates key from value in query |
| ? | %3F | Reserved — marks start of query string |
| @ | %40 | Reserved — separates user-info from host |
Who Uses This Tool and Why
- ✓Web developers encode user-supplied text (names, search terms, addresses) before including it in query parameters to prevent URL injection and ensure correct transmission.
- ✓API developers encode endpoint parameters that contain special characters like slashes, colons, or brackets so they are not misinterpreted as URL structure.
- ✓SEO specialists decode percent-encoded URLs from log files and analytics tools to read the actual search queries and page paths being requested.
- ✓Cybersecurity analysts decode percent-encoded payloads in URLs to inspect potential attack vectors such as directory traversal or cross-site scripting attempts.
- ✓Email marketers decode tracking URLs in email campaigns to verify that UTM parameters and redirect chains are correctly configured.
Limitations & Practical Tips
Known Limitations
- •Percent-encoding is not the same as HTML entity encoding — &, <, > etc. are HTML entities and should not be confused with %26, %3C, %3E URL encoding.
- •Double-encoding (encoding an already-encoded string) is a common mistake that produces strings like %2520 (% sign encoded as %25 then 20) — always decode before re-encoding.
- •The tool encodes Unicode characters as their UTF-8 byte sequences (e.g. é → %C3%A9) which is correct per RFC 3986, but some legacy systems may expect different encodings.
Tips for Best Results
- →Always use Component encoding mode (encodeURIComponent) when encoding individual query parameter values — this ensures characters like &, =, and ? in your values do not break the URL structure.
- →When building URLs programmatically, use your language's built-in URL-encoding function (urllib.parse.quote in Python, encodeURIComponent in JavaScript) rather than manual substitution to handle all edge cases.
- →To decode a URL from your browser's address bar, copy it and paste into the decoder — this is useful for reading search engine URLs with complex query strings.
Frequently Asked Questions
- Why do URLs need to be encoded?
URLs can only contain a limited set of ASCII characters. Special characters like spaces, ampersands, and non-ASCII letters must be percent-encoded (e.g., a space becomes %20) to be safely transmitted over the web.
- What is the difference between Component mode and Full URL mode?
Component mode encodes all special characters including / ? & and =, which is suitable for query parameter values. Full URL mode preserves those characters since they are structural parts of the URL — use it when encoding a complete URL.
- How do I decode a percent-encoded URL?
Paste the encoded URL into the input panel and click "Decode URL". The tool converts all %XX sequences back to their original characters.
- What is the difference between %20 and + for encoding spaces?
%20 is the correct percent-encoding of a space as defined by RFC 3986 and works in all URL contexts. The + sign represents a space only in query strings using the application/x-www-form-urlencoded format (the default for HTML form submissions). In URL paths, + is treated as a literal plus sign, not a space.
- Should I encode the entire URL or just the parameters?
Encode individual parameter values using Component mode, not the entire URL. Encoding the full URL with Component mode would percent-encode the structural characters (/, ?, &, =) and break the URL structure entirely.
- What characters do NOT need to be encoded in a URL?
RFC 3986 defines these unreserved characters as safe to use without encoding: A–Z, a–z, 0–9, hyphen (-), underscore (_), tilde (~), and period (.). Everything else should be percent-encoded in component values.
- What does double-encoding mean and why is it a problem?
Double-encoding happens when you encode a string that is already encoded — for example, encoding %20 produces %2520 (the % becomes %25). This causes servers to receive the wrong value. Always decode first before re-encoding to avoid this issue.
Looking for more tools like this? Browse all Developer Tools →
More Developer Tools
JSON Formatter
Format, validate, and minify JSON online. Instantly beautify or compress JSON data with syntax highlighting. Free JSON formatter and validator.
Base64 Encoder / Decoder
Encode text to Base64 or decode Base64 strings back to plain text online. Free Base64 encoder decoder tool for developers and data analysts.
Password Generator
Generate strong, random passwords instantly. Customize length and character types. Free secure password generator tool for safe online accounts.
Color Converter
Convert colors between HEX, RGB, HSL, and HSB online free. Pick colors visually and copy CSS values in any format instantly — no signup needed.
Unix Timestamp Converter
Convert Unix timestamps to human-readable dates and times online free. Convert dates to Unix timestamps in seconds or milliseconds instantly.
Regex Tester
Test and debug regular expressions online free. Write regex patterns, test against sample text, and see matches highlighted instantly.
You Might Also Like
Word Counter
Count words, characters, sentences, and paragraphs instantly. Free online word counter tool with reading time estimate for writers and students.
Character Counter
Count characters with and without spaces instantly. Free online character counter for Twitter, Instagram, SMS, and meta tag length limits.
Percentage Calculator
Calculate percentages, percentage change, and what percent one number is of another. Free online percentage calculator for everyday math.
Last updated: May 2, 2026 — URL Encoder / Decoder by CalcDash.