URL Encoder / Decoder
Encode and decode URL strings using percent encoding for links and APIs.
encodeURIComponent encodes everything except A-Z a-z 0-9 - _ . ! ~ * ' ( ) — use for query parameter values.
Free browser-based tool · Runs 100% on your device · Last updated
What is the URL Encoder / Decoder?
The free URL Encoder and Decoder converts text to and from percent-encoded (URL-safe) format instantly. Paste any string — including spaces, special characters, or non-ASCII text — into the Input textarea, choose encodeURIComponent for individual query values or encodeURI for full URLs, and the correctly encoded result appears immediately in the Output textarea. Click ⇄ Swap to move the output back to input for decoding in the other direction.
- → Encode query string parameter values before appending them to a URL
- → Decode percent-encoded URLs from server logs, redirects, or browser address bars
- → Fix URLs broken by spaces or special characters that fail API requests
- → Encode JSON strings or search terms for use in GET request query parameters
- → Inspect and clean up URL-encoded form data from HTTP POST bodies
How to Use the URL Encoder / Decoder
- 1 Paste your text or URL into the Input textarea.
- 2 Choose the encoding mode: encodeURIComponent encodes everything including
&,=, and/— best for individual query parameter values. encodeURI preserves URL structure characters like://,/, and?— best for full URLs. - 3 The encoded result appears instantly in the Output textarea.
- 4 To decode a percent-encoded string, click ⇄ Swap to move the output into the input, then the decoded text will appear as output.
- 5 Click Copy to copy the result to your clipboard.
Key Features
- 🔗 Two encoding modesencodeURIComponent for query values; encodeURI for full URLs — choose the right one for your use case.
- 🔄 Encode & DecodeConvert in both directions — encode special characters to percent-encoding or decode them back.
- ⇄ Swap buttonMove output back into input instantly for easy round-trip testing.
- ⚡ Live outputResults update as you type.
- 🌍 Unicode supportCorrectly handles emoji, accented characters, and all non-ASCII text.
Example Usage
hello world & category=books?q=clean code
hello%20world%20%26%20category%3Dbooks%3Fq%3Dclean%20code
Frequently Asked Questions about the URL Encoder / Decoder
- What is the URL Encoder / Decoder?
- The URL Encoder / Decoder is a free online tool that lets you encode and decode URL strings using percent encoding for links and APIs. It runs entirely in your browser, so there is nothing to install and nothing is uploaded to a server.
- Is the URL Encoder / Decoder free?
- Yes — the URL Encoder / Decoder is completely free, with no account, subscription, signup, or usage limits.
- Is my data uploaded or stored?
- No. The URL Encoder / Decoder processes everything locally in your browser. Your input is never uploaded, saved, or shared with any server.
- Does the URL Encoder / Decoder work offline?
- Yes. Once the page has finished loading, the URL Encoder / Decoder works without an internet connection.
- Which browsers does the URL Encoder / Decoder work in?
- The URL Encoder / Decoder works in all modern browsers, including Chrome, Firefox, Safari, and Edge — no plugins or extensions needed.
- What is the difference between encodeURIComponent and encodeURI?
- encodeURIComponent encodes nearly all special characters — including &, =, +, /, ?, and # — making each value safe to embed inside a URL. encodeURI preserves URL-structure characters and is designed for encoding a full URL without breaking its structure. Use encodeURIComponent when building query strings; use encodeURI only when encoding a complete URL.
- Why does %20 appear instead of + for spaces?
- Both %20 and + can represent a space in URLs, but in different contexts. %20 (percent-encoding per RFC 3986) works universally everywhere. The + sign represents a space only in the application/x-www-form-urlencoded format used by HTML forms. This tool uses %20, which is always safe regardless of context.
Related Free Developer Utilities
String Escaper
Escape special characters in strings for JavaScript, JSON, HTML, and more.
Number Base Converter
Convert numbers between binary, octal, decimal, and hexadecimal.
JSON Formatter
Format, validate, and beautify JSON data with syntax highlighting.
JSON Validator
Validate JSON syntax and get clear error messages for invalid JSON.
XML Formatter
Format and prettify XML code with proper indentation.
YAML Formatter
Format and validate YAML files with clear syntax error reporting.