URL Encoder Decoder
Encode, decode, parse, and build URLs instantly. Free online tool with real-time conversion and bulk processing.
| Character | Encoded | Description |
|---|---|---|
| (space) | %20 | Space character |
| ! | %21 | Exclamation mark |
| # | %23 | Hash / pound sign |
| $ | %24 | Dollar sign |
| & | %26 | Ampersand |
| ' | %27 | Apostrophe |
| ( | %28 | Opening parenthesis |
| ) | %29 | Closing parenthesis |
| * | %2A | Asterisk |
| + | %2B | Plus sign |
| , | %2C | Comma |
| / | %2F | Forward slash |
| : | %3A | Colon |
| ; | %3B | Semicolon |
| = | %3D | Equals sign |
| ? | %3F | Question mark |
| @ | %40 | At sign |
| [ | %5B | Opening bracket |
| ] | %5D | Closing bracket |
How to Use the URL Encoder Decoder Tool
This free URL encoder decoder tool allows you to quickly encode plain text into URL-safe format or decode percent-encoded strings back to readable text. Whether you are a web developer working with API endpoints, a digital marketer building tracking URLs, or anyone who needs to handle URL encoding, this tool makes it simple and instant.
What Is URL Encoding and Why Does It Matter?
URL encoding (also known as percent encoding) is a method for converting characters that are not allowed in a URL into a universally accepted format. URLs are only allowed to contain a specific set of characters defined by RFC 3986. These include uppercase and lowercase letters (A-Z, a-z), digits (0-9), and a handful of special characters: hyphens (-), underscores (_), periods (.), and tildes (~).
Any character outside this safe set must be percent-encoded. The encoding process replaces each unsafe character with a percent sign (%) followed by two hexadecimal digits that represent the character's byte value in the UTF-8 character encoding. For example, a space character becomes %20, an ampersand becomes %26, and the Japanese character for mountain becomes %E5%B1%B1.
Without proper URL encoding, web browsers and servers may misinterpret the URL. An ampersand in a query parameter value could be mistaken for a parameter separator. A space could break the URL entirely. A hash symbol could be treated as a fragment identifier. Encoding ensures that every character is transmitted exactly as intended.
How to Encode a URL
To encode text using this tool:
- Select the "Encode / Decode" tab (selected by default).
- Type or paste your text into the input area. The tool converts in real time as you type.
- Click "Encode (encodeURIComponent)" to encode individual values, or "Encode (encodeURI)" to encode a complete URL while preserving its structure.
- Copy the encoded result using the "Copy Result" button.
How to Decode a URL-Encoded String
Decoding reverses the encoding process. If you have a string like hello%20world%26more, paste it into the input area and click "Decode." The tool converts all percent-encoded sequences back into their original characters, giving you hello world&more.
Understanding encodeURI vs encodeURIComponent
JavaScript provides two functions for URL encoding, and choosing the right one is important:
encodeURIencodes a complete URI. It preserves characters that are meaningful in a URL structure, including colons (:), forward slashes (/), question marks (?), hash symbols (#), and ampersands (&). Use this when you want to encode an entire URL without breaking its structure.encodeURIComponentencodes a URI component, typically a query parameter value. It encodes everything except letters, digits, hyphens, underscores, periods, and tildes. Use this when you need to safely include a value as part of a query string.
For example, encoding the string https://example.com/path?q=test:
encodeURIproduces:https://example.com/path?q=test(unchanged because all characters are valid in a URL)encodeURIComponentproduces:https%3A%2F%2Fexample.com%2Fpath%3Fq%3Dtest(structural characters are encoded)
Breaking Down URLs
The URL Parser tab lets you paste any URL and instantly see it broken down into its constituent parts: protocol (scheme), hostname, port, pathname, search parameters, and fragment (hash). This is useful for debugging complex URLs, understanding redirect chains, or verifying that tracking parameters are correctly structured.
Query String Builder
The Query String Builder tab helps you construct properly encoded query strings without manual encoding. Enter a base URL, add key-value parameter pairs, and the tool generates the complete URL with all values properly encoded. This is especially useful when building API requests with multiple parameters, creating tracking URLs with UTM parameters, or constructing search queries.
Bulk URL Encoding and Decoding
When you need to process multiple URLs or strings at once, switch to the Bulk Process tab. Enter one URL or string per line, click the appropriate button, and all lines are processed simultaneously. The results maintain the same order as the input, making it easy to match inputs to outputs.
Common Use Cases for URL Encoding
- Building API request URLs with query parameters that contain special characters
- Creating tracking URLs with UTM parameters for marketing campaigns
- Encoding file paths that contain spaces or international characters
- Passing URLs as parameter values inside other URLs (double encoding)
- Debugging encoded URLs in server logs or analytics reports
- Encoding form data for HTTP POST requests with application/x-www-form-urlencoded content type
- Working with OAuth signatures that require precise percent encoding
Tips for Working with URL Encoding
Here are some practical tips to keep in mind when working with URL encoding:
- Always use
encodeURIComponentfor individual query parameter values. UsingencodeURIon a value that contains an ampersand will not encode it, potentially creating an unintended parameter boundary. - Be careful with double encoding. If a value is already encoded and you encode it again,
%20becomes%2520. Always know whether your input is raw or already encoded. - The plus sign (+) and
%20both represent a space in query strings, but they are not interchangeable in all contexts. The%20encoding is correct for path segments, while+is traditionally used only in query strings (application/x-www-form-urlencoded format). - When working with non-ASCII characters like emoji or characters from non-Latin scripts, the characters are first encoded in UTF-8 and then each byte is percent-encoded. A single character can produce multiple percent-encoded sequences.
- Modern browsers display decoded URLs in the address bar for readability, but the actual request uses the encoded form. Do not assume what you see in the browser is what gets sent to the server.
URL Encoding in Different Programming Languages
While this tool uses JavaScript functions, most programming languages have their own URL encoding utilities:
- Python:
urllib.parse.quote()andurllib.parse.unquote() - Java:
URLEncoder.encode()andURLDecoder.decode() - PHP:
urlencode()andurldecode(), orrawurlencode()andrawurldecode() - C#:
Uri.EscapeDataString()andUri.UnescapeDataString() - Ruby:
CGI.escape()andCGI.unescape() - Go:
url.QueryEscape()andurl.QueryUnescape()
Note that each language may have slight differences in which characters are encoded and which are left as-is. Always test your encoding with the specific characters you expect to handle.
Security Considerations
Proper URL encoding is an important part of web security. Failing to encode user input before including it in URLs can lead to injection vulnerabilities. Always encode user-supplied data before placing it in a URL, and always decode and validate data received from URL parameters before using it in your application.
All processing in this tool happens entirely in your browser. No data is transmitted to any server, making it safe to use with sensitive URLs, API keys in query parameters, or any other private data.
Community Questions
- How to decode URL-encoded strings in JavaScript? 14 answers · tagged: javascript, url, decoding
- Percent encoding in URLs explained? 10 answers · tagged: url, encoding, standards
- How to handle UTF-8 characters in URLs? 12 answers · tagged: url, utf-8, encoding
How This Tool Works
The URL Encoder Decoder transforms your input from one format into another using algorithms that run entirely in your browser. No data is uploaded to any server, which means the conversion is instant, private, and works offline after the page loads.
The conversion process validates your input first to catch syntax errors or unsupported characters before attempting the transformation. If the input is valid, the tool applies the appropriate encoding, decoding, or reformatting rules and displays the result. Invalid input produces a clear error message explaining what went wrong.
You can convert repeatedly without any limits. Paste new input, adjust options if available, and get a fresh result each time. The tool also supports copying the output to your clipboard or downloading it as a file for convenient integration into your workflow.
Features and Options
The tool provides a clean interface with clearly separated input and output areas. Paste or type your source data on one side and see the converted result on the other. Options for controlling the conversion behavior, such as formatting, encoding variants, or delimiter choices, are grouped logically near the top.
One-click copy buttons eliminate the tedious select-all-and-copy routine. For larger outputs, a download button lets you save the result directly as a file with the correct extension and encoding. These small conveniences add up when you are converting data frequently.
Error handling is built into every step. The tool highlights problems in your input, explains what is expected, and in many cases offers suggestions for fixing the issue. This makes it useful for learning a format as well as for routine conversion tasks.
Real World Use Cases
Software developers use format converters daily when working with APIs, configuration files, data imports, and interoperability between systems that expect different formats. Having a reliable browser tool for quick conversions avoids writing one-off scripts.
Data analysts convert between formats when moving data between tools. A CSV exported from one application may need to become JSON for another, or a timestamp in one format may need to match a different system's expected layout. This tool handles those transformations instantly.
System administrators and DevOps engineers use converters for encoding credentials, transforming configuration snippets, and debugging data that arrives in an unexpected format. The browser-based approach means no additional software needs to be installed on production machines.
Frequently Asked Questions
Hacker News Discussions
- Show HN: Client-side ads-free dev utils (diffs, time conversion, JSON formatter) 10 points · 3 comments
- Show HN: ut – Rust based CLI utilities for devs and IT 170 points · 63 comments
- Show HN: Zxc – Rust TLS proxy with tmux and Vim as UI, BurpSuite alternative 106 points · 15 comments
Source: Hacker News
Research Methodology
This url encoder decoder tool was built after analyzing search patterns, user requirements, and existing solutions. We tested across Chrome, Firefox, Safari, and Edge. All processing runs client-side with zero data transmitted to external servers. Last reviewed March 19, 2026.
Performance Comparison
Benchmark: processing speed relative to alternatives. Higher is better.
PageSpeed Performance
Measured via Google Lighthouse. Single HTML file with zero external JS dependencies ensures fast load times.
Browser Support
| Browser | Desktop | Mobile |
|---|---|---|
| Chrome | 90+ | 90+ |
| Firefox | 88+ | 88+ |
| Safari | 15+ | 15+ |
| Edge | 90+ | 90+ |
| Opera | 76+ | 64+ |
Tested March 2026. Data sourced from caniuse.com.
npm Ecosystem
| Package | Description |
|---|---|
| query-string | URL Query Parser |
| url-parse | URL Parser |
Data from npmjs.com. Updated March 2026.
Live Stats
URL encoding, also called percent encoding, is the process of converting characters into a format that can be safely transmitted in a URL. Special characters are replaced with a percent sign followed by two hexadecimal digits representing the character's ASCII value. For example, a space becomes %20 and an ampersand becomes %26.
encodeURI encodes a full URI but preserves characters that have special meaning in URLs like colons, slashes, question marks, and hash symbols. encodeURIComponent encodes everything except letters, digits, and a few special characters like hyphens, underscores, periods, and tildes. Use encodeURIComponent for encoding individual query parameter values.
URL encoding is necessary because URLs can only contain a limited set of characters from the ASCII character set. Characters like spaces, ampersands, equals signs, and non-ASCII characters must be encoded so they do not interfere with the URL structure. Without encoding, a space in a query parameter could break the URL.
Characters that need URL encoding include spaces, exclamation marks, hash symbols, dollar signs, ampersands, single quotes, parentheses, asterisks, plus signs, commas, slashes, colons, semicolons, equals signs, question marks, at symbols, square brackets, and any non-ASCII characters like accented letters or emoji.
To decode a URL-encoded string, replace each percent-encoded sequence (%XX) with the character it represents. In JavaScript, you can use the decodeURIComponent function. This tool does it automatically: paste your encoded string and get the decoded result in real time.
You can encode an entire URL using the encodeURI function, which preserves the URL structure while encoding special characters within it. However, if you want to pass a URL as a query parameter value inside another URL, use encodeURIComponent to encode the entire URL including its structural characters.
A query string is the part of a URL that comes after the question mark. It consists of key-value pairs separated by ampersands. For example, ?name=John&age=30 is a query string with two parameters. This tool includes a query string builder that lets you add key-value pairs and generates the properly encoded query string automatically.
Yes, this URL encoder decoder tool is completely free to use with no limits. All processing happens in your browser so your data never leaves your device. There is no sign-up required, no rate limiting, and no data collection.