URL Encode & Decode Online — Free, In Your Browser
Encode or decode URLs and query strings with percent-encoding online. Handles special characters and Unicode. Free, no signup, and nothing is uploaded.
Last updated:
Was this tool useful?
Use the tool above and you can rate it here.
What is URL encoding?
URLs can only contain a limited set of characters. When you need to include spaces, punctuation, or non-ASCII characters (like ₹ or 中文) in a URL, they must be percent-encoded — replaced with %XX where XX is the hex value of the character, per the percent-encoding rules in RFC 3986 (URI Generic Syntax).
This tool uses encodeURIComponent and decodeURIComponent — the same functions your browser and JavaScript use internally. It correctly handles Unicode, emoji, and multi-byte characters.
Common encoded characters
- Space →
%20 - & →
%26 - = →
%3D - ? →
%3F - / →
%2F - # →
%23 - + →
%2B
Common use cases for URL encoding
Frontend developers encode query parameter values before appending them to API endpoints — a search query like "price ≥ ₹500" becomes price+%E2%89%A5+%E2%82%B9500 when passed as a URL parameter. Backend engineers decode incoming query strings to extract the original user-supplied values before processing. Content teams building UTM-tagged marketing URLs encode campaign names that contain spaces and special characters. Web scrapers decode percent-encoded URLs from sitemaps to recover human-readable page paths.
encodeURI vs encodeURIComponent — when to use which
Use encodeURI when encoding a complete URL — it preserves structural characters like /, ?, =, and & so the URL remains functional. Use encodeURIComponent when encoding a single query parameter value — it encodes everything including / and & so the value cannot accidentally break the URL structure. This tool uses encodeURIComponent, which is the safe default for parameter values. If you need to encode a full URL without breaking its structure, use encodeURI instead, available in any browser console.
Decoding garbled URLs
When you copy a URL from a browser address bar or API response and see sequences like %E2%82%B9, paste it into the decoder to see the original text (₹ in this case). Email clients and some CMS platforms double-encode URLs, turning %20 into %2520 — decode twice to recover the original. Log files from web servers typically store raw percent-encoded request paths; use this tool to decode them into readable form when debugging 404 errors caused by special characters in file paths.
Frequently asked questions
- What is URL encoding?
- URL encoding (also called percent-encoding) converts characters that aren't allowed in a URL into a safe format. Each unsafe character is replaced with a % sign followed by two hex digits. For example, a space becomes %20, and & becomes %26.
- When do I need to encode a URL?
- Whenever you include user input or special characters in a URL — query parameters, path segments, or form data. Characters like spaces, &, =, ?, #, and non-ASCII text (like ₹ or Hindi script) must be encoded to avoid breaking the URL structure.
- What's the difference between encodeURI and encodeURIComponent?
- encodeURI encodes a full URL and leaves structural characters like / ? & = intact. encodeURIComponent (what this tool uses) encodes everything except letters, digits, and - _ . ! ~ * ' ( ) — making it safe for individual query parameter values.
- Is my data sent to a server?
- No. Encoding and decoding happen in your browser using JavaScript's built-in encodeURIComponent and decodeURIComponent functions. Nothing is uploaded.
From the blog
- UTF-8, Unicode and Character Encoding: A Developer Guide
Why mojibake happens, how Unicode code points map to UTF-8 bytes, how ASCII, Unicode and UTF-8 differ and why 'just use UTF-8' still needs understanding.
- URL Encoding Explained: Why Links Break and How to Fix Them
What percent-encoding is, which URL characters must be encoded, encodeURI vs encodeURIComponent in JavaScript and the production bugs it causes.
- Base64 Encoding Explained: What It Is and When to Use It
Base64 encoding turns binary data into text so it can travel through text-only channels. How it works, where it's used and the mistakes developers make.
Related tools
- Base64 Encode & Decode Online — Free, In Your Browser
Encode text to Base64 or decode Base64 back to text online, with Unicode support. Free, no signup, and nothing is uploaded: it all runs in your browser.
- Unicode Converter
Convert text to Unicode code points and back, and inspect each character's UTF-8 byte sequence. Free, instant, no sign-up.
- Text to Slug Generator
Convert any title or text into a clean, SEO-friendly URL slug instantly — lowercase, hyphenated, and ready to publish. Free, no sign-up.
- HTML Entity Encoder / Decoder
Encode HTML special characters into entities, or decode entities back to plain text, instantly in your browser. Free, no sign-up needed.