URL Encoder & Decoder
Encode or decode URLs and text instantly — supports Component, Full URL, and Raw encoding modes with recursive decode, URL parser, bulk processing, and code snippets for 7 languages. Free, fast, and 100% browser-based — your data never leaves your machine.
About the URL Encoder & Decoder
Every URL you click, every form you submit, and every API call your app makes relies on
URL encoding (also called percent-encoding) to safely
transport data across the internet. Characters that have special meaning in URLs — like
spaces, ampersands (&), equals signs (=), and hash marks
(#) — must be converted into percent-encoded sequences (e.g., %20,
%26, %3D, %23) so they don't break the URL structure.
Our URL Encoder & Decoder is a best-in-class, free online tool that goes far beyond basic encode/decode. It offers three encoding variants with clear guidance on when to use each:
- Component mode (
encodeURIComponent) — Encodes everything exceptA-Z a-z 0-9 - _ . ! ~ * ' ( ). Use this for query parameter values, form data, and any text being placed inside a URL. This is the right choice 90% of the time. - Full URL mode (
encodeURI) — Preserves URL-structural characters like: / ? # [ ] @ ! $ & ' ( ) * + , ; =. Use this when you have a complete URL with special characters in the path or query string but want to keep the URL structure intact. - Raw mode (RFC 3986) — Strict percent-encoding that encodes everything
except unreserved characters (
A-Z a-z 0-9 - _ . ~). Use this for maximum compatibility and standards compliance.
Unique features you won't find in most online tools:
- URL Parser — In URL mode, automatically breaks down your URL into protocol, host, path, query parameters (as a readable table), and fragment
- Recursive decode — Automatically detects and decodes multi-encoded
strings (e.g.,
%2520→%20→ space), showing each pass - Bulk mode — Encode or decode multiple URLs at once, one per line
- Code snippets — Auto-generated encode/decode code for JavaScript, Python, PHP, Java, Go, cURL, and C#
- Space encoding choice — Choose between
%20(standard) and+(form-data compatible)
100% browser-based — your data is never uploaded to any server. All processing runs entirely in your browser using JavaScript. No file size limits, no signup, no privacy concerns.
Why Choose Our URL Encoder Over Others?
- Three encoding variants with clear guidance — Most tools offer just one
mode. We offer Component, Full URL, and Raw with explanations of when to use each,
eliminating the common
encodeURIvsencodeURIComponentconfusion. - Visual URL parser — Paste a URL and instantly see it broken down into protocol, host, port, path, query parameters (as a table), and fragment. No other free tool does this in-line with encoding.
- Recursive decode shows each pass — When data has been encoded multiple times (common with ad tracking URLs, redirect chains, and analytics platforms), our tool decodes layer by layer and shows you each step — not just the final result.
- Bulk processing — Encode or decode hundreds of URLs at once, one per line. Essential for SEO professionals working with URL lists from crawl reports.
- Code snippets in 7 languages — After encoding, get ready-to-use code for JavaScript, Python, PHP, Java, Go, cURL, and C# — copy and paste directly into your project.
- Draft persistence — Your last input is saved in localStorage and restored when you return. Never lose work-in-progress.
When Should You URL Encode?
- Building API request URLs — When constructing URLs with query parameters from user input or dynamic data, always encode the values to prevent injection and ensure the URL is valid.
- Debugging encoded URLs — Analytics tracking URLs, ad platform click URLs, and redirect chains often contain heavily encoded parameters. Decode them to understand what's actually being passed.
- Form data submission — HTML forms encode data using
application/x-www-form-urlencodedformat. Understanding this format helps debug form submission issues. - Embedding URLs inside URLs — When passing a URL as a query parameter (like a redirect URL), the inner URL must be encoded to prevent its special characters from being interpreted as part of the outer URL.
- International characters in URLs — Non-ASCII characters (Chinese, Arabic, emoji, accented letters) must be percent-encoded for URLs to work across all browsers and servers.
- SEO and crawl analysis — When reviewing crawl reports, log files, or Google Search Console data, URLs are often shown encoded. Decode them to understand which pages were actually crawled.
Pro tip: When in doubt about which encoding mode to use — choose Component. It's the safest option that encodes everything that could potentially break a URL. Only use Full URL mode when you have a complete, well-formed URL whose structure you want to preserve.
Frequently Asked Questions
What is URL encoding (percent-encoding)?
&, =, #, and non-ASCII
characters — are replaced with a percent sign (%) followed by two hexadecimal
digits representing the character's byte value. For example, a space becomes
%20, an ampersand becomes %26, and the Japanese character あ
becomes %E3%81%82 in UTF-8.
What's the difference between encodeURI() and encodeURIComponent()?
- _ . ! ~ * ' ( ) are left untouched. It's designed for encoding a
single value that will be placed inside a URL (like a query parameter value).
encodeURI() is more conservative — it also preserves URL-structural
characters like : / ? # [ ] @ ! $ & ' ( ) * + , ; =. It's designed for
encoding a complete URL while keeping its structure intact. The simple rule:
use encodeURIComponent for values, encodeURI for full URLs.
When should I use URL encoding?
Why are spaces encoded as %20 or +?
%20 is the
standard percent-encoding defined by RFC 3986 and works in all parts of a URL.
The + sign comes from the older
application/x-www-form-urlencoded format used by HTML form submissions.
In modern practice, %20 is preferred and more universally compatible.
However, many servers and frameworks accept both. Our tool lets you choose which format
to use via the "Encode spaces as +" option.
How do I decode a URL with special characters?
%XX sequences back to
their original characters. For example,
Hello%20World%21 becomes Hello World!. If the URL has been
encoded multiple times (common with analytics tracking URLs), enable the
Recursive Decode option to automatically decode through all layers.
What is double or recursive URL encoding?
%20 in the first pass, then %20 itself gets
encoded to %2520 (the % becomes %25). This is
common with redirect chains, ad tracking URLs (Google Ads, Facebook), and analytics
platforms. Our Recursive Decode feature detects this and decodes layer
by layer (up to 16 passes), showing you each step so you can understand the encoding depth.