Free URL Encoder & Decoder
Encode URL query parameters with percent-encoding and decode percent-encoded URLs back to readable text. Choose encodeURI or encodeURIComponent. All processing in your browser.
All processing happens in your browser — your data never leaves your device.
About Free URL Encoder & Decoder
URLs are governed by a strict specification (RFC 3986) that limits which characters are allowed in different parts of a URL. Only unreserved characters — letters A-Z and a-z, digits 0-9, and the characters -, _, ., ~ — can appear unencoded anywhere in a URL. Every other character must be represented as a percent-encoded sequence: a percent sign (%) followed by the two-digit hexadecimal ASCII code for that character. For example, a space becomes %20, the ampersand & becomes %26, an equals sign = becomes %3D, and a forward slash / becomes %2F.
Percent-encoding (also called URL encoding) is essential whenever you embed user-supplied text, file names, search queries, or other data in URLs. Without encoding, characters like & would be interpreted as query parameter separators, # would be interpreted as a fragment identifier, and spaces would make the URL malformed. Our free URL encoder lets you choose between two encoding functions: encodeURIComponent, which encodes everything including &, =, ?, #, and / — ideal for individual query parameter values; and encodeURI, which preserves URL structure characters (:, /, ?, #, &, =, @) and is intended for complete URLs that are mostly well-formed but contain some unsafe characters. The tool also decodes percent-encoded strings back to readable text. A swap button lets you instantly reverse encode to decode. All processing uses JavaScript's native encodeURIComponent and encodeURI functions — running entirely in your browser with no server involved.
Key Features
Everything you need — no software installation required.
Two Encoding Functions
Choose between encodeURIComponent (encodes everything including &, =, ?, #, /) for individual query parameter values, and encodeURI (preserves URL structure characters) for complete URLs. The type hint below the toolbar explains when to use each function, helping you choose correctly without having to look up the difference.
Encode and Decode
Switch between Encode and Decode modes with a click. Encode converts readable text to percent-encoded representation (%20, %26, %3D). Decode converts percent-encoded URLs back to their original readable form. Both operations use JavaScript's native built-in functions for accurate results.
One-Click Swap
After encoding, click Swap to instantly move the output to the input and switch to Decode mode. This makes it fast to verify that a decode operation reproduces the original text, or to reverse-engineer what a percent-encoded URL parameter contains without manual copy-paste.
One-Click Copy
Copy the encoded or decoded output to your clipboard with a single click. Works in all modern browsers using the Clipboard API with a legacy fallback. The button shows 'Copied!' confirmation for 2 seconds so you know the operation succeeded.
Error Handling
Decoding malformed percent-encoded strings (e.g., a lone % not followed by two hex digits, or %80-%FF sequences that are invalid UTF-8) throws a URI malformation error. The tool catches this and shows a clear error message, preventing silent incorrect output.
100% Private — Browser-Only
All encoding and decoding uses JavaScript's built-in encodeURIComponent, encodeURI, decodeURIComponent, and decodeURI functions, running locally in your browser. No text is transmitted to any server, making the tool safe for encoding API keys, tokens, passwords in query parameters, and other sensitive URL data.
How to Use Free URL Encoder & Decoder
Get your result in seconds — completely free, no registration needed.
Choose Encode or Decode mode
Click Encode to convert readable text to percent-encoded form, or Decode to convert a percent-encoded string back to readable text.
Select the encoding function
Choose encodeURIComponent for query parameter values (encodes everything including &, =, ?, #) or encodeURI for a complete URL (preserves URL structure characters). The hint text below the toolbar explains the difference.
Enter your text and process
Paste or type your input in the left text area. Click Encode or Decode. The result appears instantly in the right text area. If the input contains malformed percent sequences, an error message is displayed.
Copy or swap the result
Click Copy to copy the output to your clipboard. Click Swap to move the output to the input and switch modes for quick round-trip verification.
URL Encoding Functions Compared
Wide format support ensures compatibility with virtually any file you upload.
| Format | Description | Best For | Quality |
|---|---|---|---|
| encodeURIComponent | Encodes all characters except: A-Z, a-z, 0-9, -, _, ., !, ~, *, ', (, ). Encodes: space (%20), & (%26), = (%3D), ? (%3F), # (%23), / (%2F), + (%2B), @ (%40). | Query parameter values, form data, path segments containing special chars | Most aggressive — use for values |
| encodeURI | Encodes all characters except unreserved chars plus: ; , / ? : @ & = + $ #. Preserves URL structure. Does NOT encode: : / ? # & = + @ , ; $. | Complete URLs that are mostly well-formed | Preserves structure — use for full URLs |
| decodeURIComponent | Reverses encodeURIComponent — decodes all percent-encoded sequences including %2F (/) and %23 (#). Throws if input contains malformed percent sequences. | Decoding query parameter values received from server or URL | Decodes everything |
| decodeURI | Reverses encodeURI — does NOT decode sequences that encodeURI would not have encoded (e.g., %2F, %23, %26). Preserves URL structure characters in their encoded form. | Decoding complete URLs while preserving structure | Preserves structure characters |
Who Uses Free URL Encoder & Decoder?
Trusted by millions of users across different industries and workflows.
API Developers
Build API request URLs with query parameters that contain special characters. Encode each parameter value with encodeURIComponent before appending it to the URL. This ensures characters like &, =, +, and # in your data are not interpreted as URL delimiters by the server.
Web Developers
Generate safe URLs for user-generated content: search queries, file names in paths, user profile slugs. URL-encode any value that came from user input before including it in a URL to prevent URL injection and malformed links.
API Testing (Postman / Insomnia)
Postman and similar tools sometimes require manually URL-encoded query parameters. Encode the values here and paste them directly into the query string. Also useful for decoding encoded URLs from server logs or error messages to understand what was actually requested.
SEO & Link Analysis
Decode percent-encoded URLs from server logs, Google Search Console, or analytics tools to read them in human-readable form. Understand what search queries, referral parameters, and tracking codes are contained in encoded URL strings from web analytics data.
Data Analysts
Extract and decode URL parameters from web log data, clickstream data, or referral tracking URLs. Percent-encoded query strings from logs are often unreadable — decode them to extract the original values: search terms, campaign IDs, product names, and user actions.
Backend Developers
Verify that URL encoding in backend code produces the expected output. Test the difference between encodeURI and encodeURIComponent on various inputs. Debug URL parsing issues by encoding and decoding the problematic string to see exactly which characters are being transformed.
Why Choose Our Tool?
Built for speed, privacy, and reliability — everything works right in your browser.
Correct encoding function selection
The tool exposes both encodeURI and encodeURIComponent with a clear explanation of when to use each, preventing the common mistake of using the wrong function and producing malformed or over-encoded URLs.
No account or registration
Open the tool, paste text, encode or decode, copy. No sign-up form, no email confirmation, no premium tier. Completely free and anonymous.
Native browser functions
Uses JavaScript's built-in encodeURIComponent/decodeURIComponent which produce the same output as any browser or server-side JavaScript environment. Results are guaranteed to match what your JavaScript code would produce.
Works offline after page load
encodeURIComponent and decodeURIComponent are browser built-ins — they require no network access. The tool works without an internet connection once the page has loaded.
Pro Tips & Best Practices
Get the best results with these expert recommendations.
Always use encodeURIComponent for query parameter values
The most common URL encoding mistake is using encodeURI for query parameter values. encodeURI does not encode & and = characters, which are used as parameter delimiters in query strings. If a parameter value contains & (e.g., 'cats & dogs'), encodeURI would leave it unencoded, causing the server to interpret it as two separate parameters. Always use encodeURIComponent for values.
Decode percent-encoded URLs from logs for readability
Server access logs store raw URLs as received from browsers, with spaces encoded as %20 and other characters percent-encoded. Paste a log URL into the tool to decode it to a readable form for debugging, analysis, or copying into a browser address bar.
Encode file names in download URLs
File names with spaces and special characters (report (Q4 2025).pdf, données-export.csv) must be percent-encoded in download URLs. Encode the file name portion of the path with encodeURIComponent to ensure the URL is valid across all browsers and server configurations.
Double-encoding is a common bug
If you encode a URL parameter value that is already percent-encoded, the % signs themselves will be encoded to %25, producing double-encoded output (%2520 instead of %20). Always encode only unencoded values. If your input already contains %20 and similar sequences, use Decode first to get the raw text, then re-encode if needed.
Related Tools
More free online tools you might find useful.
Frequently Asked Questions
Everything you need to know about Free URL Encoder & Decoder.