Loading URL Encoder...
URL Encoder & Decoder - Free Percent Encoding Tool
A free online URL encoder and decoder. Instantly encode any text or URL into percent-encoded format, or decode %20 strings into plain text locally in your browser.
Last reviewed: April 2026 · Implements RFC 3986 percent-encoding
How to URL Encode Text
- Select the Encode tab at the top of the tool
- Choose your encoding type - encodeURIComponent for query values or encodeURI for full URLs
- Type or paste your text or URL into the input panel
- The URL encoded output appears instantly in the output panel
- Click Copy Encoded to copy the result to your clipboard
How to URL Decode a String
- Select the Decode tab at the top of the tool
- Paste your percent-encoded string into the input panel
- The decoded plain text appears instantly in the output panel
- The tool handles both %20 style and mixed encoded strings automatically
- Click Copy Decoded to copy the result to your clipboard
How to Use the URL Analyzer
- Scroll to the URL Analyzer section below the main tool
- Paste any complete URL including the protocol (e.g. https://example.com/path?q=hello)
- The tool instantly breaks the URL into protocol, host, port, path, query string, and fragment
- All query parameters are listed individually with both their encoded and decoded values
- Use this to debug malformed URLs or inspect API endpoint query strings
encodeURIComponent vs encodeURI - When to Use Which
encodeURIComponent should be used when encoding individual query parameter values (the text after the = sign in a URL). It encodes almost all characters including ?, =, &, and / to ensure they don't break the URL's structure.
encodeURI should be used when encoding a complete URL (like https://example.com/search?q=hello world). It intentionally leaves structural characters like ?, =, &, and / untouched, only encoding spaces and characters that are completely invalid in a URL.
Rule of thumb: if you are encoding a value that will go inside a query string parameter, use encodeURIComponent. If you are encoding an entire URL, use encodeURI.
URL Encode vs URL Decode - What's the Difference?
URL encoding takes plain text or a raw URL and converts any characters that are not allowed in a URL into a valid, safe percent-encoded format (like changing a space to %20).
URL decoding reverses the process. It takes a safe, percent-encoded string (like hello%20world) and converts the percentage format sequences back into their original plain text characters (like hello world).
Common Use Cases
Encode Query String Parameters Online
Query string parameters frequently contain characters like spaces, amps (&), and question marks (?). These characters must be converted into their safe percent-encoded equivalents (%20, %26, %3F) before they can be sent across the internet. These are the most common scenarios:
- Building API request URLs with user-supplied query parameters
- Encoding redirect URLs passed as query parameters (e.g., ?next=https%3A%2F%2F...)
- Debugging malformed URLs in server logs or API responses
- Creating shareable links with pre-filled search queries
- Safely passing email addresses, names, or messages in URL query strings
- Encoding data for use in HTML href attributes
- Analyzing and debugging complex URLs with many query parameters via the URL Analyzer
URL Encoding Reference Table
The most commonly encoded characters and their percent-encoded values:
| Character | Name | Encoded (%XX) |
|---|---|---|
| Space | %20 | |
| ! | Exclamation | %21 |
| # | Hash | %23 |
| $ | Dollar | %24 |
| & | Ampersand | %26 |
| + | Plus | %2B |
| , | Comma | %2C |
| / | Slash | %2F |
| : | Colon | %3A |
| ; | Semicolon | %3B |
| = | Equals | %3D |
| ? | Question mark | %3F |
| @ | At sign | %40 |
| [ | Left bracket | %5B |
| ] | Right bracket | %5D |
URL Encoding in JavaScript, Python, and PHP
Every major programming language has a built-in function for URL encoding and decoding. If you are building an application, you should use these native functions instead of doing it manually:
JavaScript
// Encode a query parameter value
const param = encodeURIComponent("hello world & goodbye");
// → "hello%20world%20%26%20goodbye"
// Encode a full URL (preserves URL structure)
const url = encodeURI("https://example.com/search?q=hello world");
// → "https://example.com/search?q=hello%20world"
// Decode a percent-encoded string
const decoded = decodeURIComponent("hello%20world%20%26%20goodbye");
// → "hello world & goodbye"Python
from urllib.parse import quote, quote_plus, unquote, urlencode
quote("hello world & goodbye")
# → "hello%20world%20%26%20goodbye"
quote_plus("hello world & goodbye")
# → "hello+world+%26+goodbye"
urlencode({"q": "hello world", "lang": "en"})
# → "q=hello+world&lang=en"
unquote("hello%20world%20%26%20goodbye")
# → "hello world & goodbye"PHP
urlencode("hello world & goodbye");
// → "hello+world+%26+goodbye"
rawurlencode("hello world & goodbye");
// → "hello%20world%20%26%20goodbye"
urldecode("hello+world+%26+goodbye");
// → "hello world & goodbye"
rawurldecode("hello%20world%20%26%20goodbye");
// → "hello world & goodbye"Key Features
- Real-time encoding and decoding - output updates instantly as you type
- Supports both encodeURIComponent (strict) and encodeURI (loose) encoding types
- Built-in URL Analyzer - breaks any URL into components and decodes all query parameters
- Character statistics - shows exactly how many characters were encoded and the resulting size change
- Sample data buttons for instant exploration of how the tool works
- Copy, paste, clear, and swap action buttons for rapid workflows
- Common URL encoding reference table with 15 frequently encoded characters
- Responsive design that works perfectly on all devices including mobile phones
- 100% free - no signup, no account, and no data uploaded to our servers
Frequently Asked Questions
What does this tool do?
This tool allows you to safely URL encode text strings and decode percent-encoded URLs. It also features a URL Analyzer that breaks down full URLs into their individual components and decrypts query parameters.
Is my data uploaded to your servers?
No. All URL encoding, formatting, and analyzing happens completely directly within your browser utilizing its built-in JavaScript engine. We never upload, save, or store your text.
What is URL percent-encoding?
URLs can only be sent over the Internet using the ASCII character-set. Since URLs often contain characters outside the ASCII set (like spaces, emojis, or international letters), they must be converted into a universally valid format. Percent-encoding replaces unsafe characters with a '%' followed by two hexadecimal digits.
What is the difference between encodeURIComponent and encodeURI?
encodeURIComponent encodes almost every special character (excluding: A-Z a-z 0-9 - _ . ! ~ * ' ( )). It is built specifically to encode isolated query parameter elements. encodeURI is looser and leaves characters that have semantic meaning in a URL untouched (like ?, /, =, &). It is used to encode a full raw URL string without breaking its navigability.
How does the URL Analyzer work?
The URL analyzer takes a full URL and breaks it into its sub-components: Protocol, Subdomain, Domain, TLD, Path, Port, Query String, and Fragment. It additionally isolates every single query parameter and exposes its raw encoded string alongside its fully decoded readable value.
Why is a space converting into %20?
A space character is not allowed in a formal URL address. Under RFC 3986 percent-encoding rules, a space is safely translated into %20 so that web servers can process it.
Can I decode a URL that is doubly encoded?
Yes, if an address was encoded twice (for example, %2520 instead of %20), you can paste the output back into the Decode tab's input block repeatedly to drill down to the original base text.
Does the Analyzer work with malformed URLs?
The analyzer requires the presence of a valid protocol (like http:// or https://) to correctly partition the address. If parsing fails, you will see a notice under the analyzer input forcing you to provide a fully formed web address.
Is this URL formatter limited in text size?
The tool handles tens of thousands of characters instantaneously. Because all permutations compute in your browser memory natively, the only technical limit is your operating system's maximum RAM.
Will it work on mobile?
Yes! The URL Encoder and Decoder are completely responsive and operate perfectly on Safari for iOS and Chrome for Android.
Is this free forever?
Yes. EveryTool promises a strict adherence to offering all available utilities completely free for everyone with no mandatory subscriptions, usage caps, or deceptive paywalls.
Related Tools
Image to Base64
Encode image to Base64 string or decode Base64 to image instantly. Fast and free.
Base64 Encoder / Decoder
Encode text or decode Base64 strings instantly in your browser. Free online Base64 encoder and decoder tool for developers.
JSON Formatter
Format, validate, and minify JSON online. Includes an advanced syntax checker and compare diffing.
Color Code Converter
Convert colors between HEX, RGB, HSL, HSV, and CMYK formats instantly. Free online color converter with live preview for developers and designers.
Word Counter
Instantly calculate words, characters, sentences, paragraphs, Keyword Density and reading time.
Hash Generator
Generate MD5, SHA-1, SHA-256, and SHA-512 hashes from any text or file instantly in your browser. Free online hash generator tool.