Online URL Encode / Decode Tool

Convert reserved characters in a URL into safe percent-encoded form, or reverse the process.

URL Encode & Decode

URL Encode / Decode turns characters that are unsafe or reserved in a URL
like (spaces, &, =, ?, # and more) into their %XX percent-encoded form and converts them back again!
Each line is treated as a separate URL, so you can encode or decode many links at once.
This is a useful utility for building links, query strings and web forms.


Load an example

Copy Download

Input: 0 characters | Output: 0 characters
Ready to encode or decode URLs.


Introduction:

Our URL Encode / Decode tool is a simple, browser-based utility that converts characters into their percent-encoded (%XX) representation and reverses the process when you need the original text back. Encoding replaces unsafe characters such as spaces, &, =, ?, # and non-ASCII symbols with a % followed by their byte value, so the text stays valid inside a URL.

Decoding does the opposite, turning those %XX sequences back into readable characters. This is useful whenever you build links, prepare query strings, or work with form data that must survive transport over the web.


What This Tool Does?

Encode Component (default): Uses encodeURIComponent to encode everything except A-Z a-z 0-9 - _ . ! ~ * ' ( ). This is the right choice for query-string values, form fields and individual URL parts.

Example: The input Tom & Jerry's "show" <2026> becomes Tom%20%26%20Jerry's%20%22show%22%20%3C2026%3E.

Encode Full URL: Uses encodeURI, which leaves the characters that structure a URL intact (such as : / ? & = # @) and only encodes the unsafe parts. Use this when you want to keep a whole link readable.

Example: The input https://example.com/search?q=blue shoes&sort=price becomes https://example.com/search?q=blue%20shoes&sort=price.

Use + for Spaces (Optional): When ticked, spaces are written as + instead of %20, matching the application/x-www-form-urlencoded format used by HTML forms.

Example: With this option, blue shoes encodes as blue+shoes instead of blue%20shoes.

Decode URL: Converts %XX sequences (and + spaces) back into plain text using decodeURIComponent. Invalid sequences are reported instead of breaking the tool.

Example: The input Tom%20%26%20Jerry%27s%20show becomes Tom & Jerry's show.

Line-by-Line & Bulk: Each line is processed as a separate URL, so you can encode or decode many links at once, paste them in, or upload a .txt file.

Copy & Download: Send the result to your clipboard with one click, or download it as a .txt file.

Live Statistics: Input and output character counts update as you type, so you can see how encoding changes the length of your text.


How to Use This Tool?

1. Enter your text: Type or paste a URL, query string or text into the Input Text box, or upload a .txt file. Put each URL on its own line to process several at once.

2. Choose an option (optional): Pick "Encode component" for query values or "Encode full URL" for whole links, and tick "Use + for spaces" if you need form-encoded output.

3. Encode or Decode: Click "Encode URL" to convert reserved characters into %XX form, or "Decode URL" to turn encoded text back into plain text. The result appears in the Output Text box.

4. Copy or download: Use the Copy link to copy the result, or Download to save it as a file. Click Clear All to start over.


Examples:

Click Try it on any example below to load it straight into the Input Text box. The text on the right of each example is what Encode URL (component mode) produces from that input. Press Encode URL or Decode URL to see the result in the Output box.

Example 1: Special characters in a value
Input
Tom & Jerry's "show" <2026>
Output (encoded)
Tom%20%26%20Jerry's%20%22show%22%20%3C2026%3E
Example 2: URL with a query string
Input
https://example.com/search?q=blue shoes&sort=price
Output (encoded, component)
https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dblue%20shoes%26sort%3Dprice
Example 3: Accented letters & emoji
Input
Café résumé ☕ & croissant 100%
Output (encoded)
Caf%C3%A9%20r%C3%A9sum%C3%A9%20%E2%98%95%20%26%20croissant%20100%25
Example 4: Email-style address with a subject
Input
john.doe@example.com?subject=Hi There!
Output (encoded)
john.doe%40example.com%3Fsubject%3DHi%20There!
Example 5: Multiple URLs (one per line)
Input
https://shop.com/item?name=red ball&id=7
https://shop.com/item?name=green hat&id=9
Output (encoded)
https%3A%2F%2Fshop.com%2Fitem%3Fname%3Dred%20ball%26id%3D7
https%3A%2F%2Fshop.com%2Fitem%3Fname%3Dgreen%20hat%26id%3D9

When to Use This Tool?

Building Query Strings: When you assemble a URL in JavaScript, PHP or another language, values such as search terms, names or emails often contain spaces and symbols. Encoding those values (component mode) keeps the query string valid so the server reads the right parameters.

Preparing HTML Form Data: Tick "Use + for spaces" to produce application/x-www-form-urlencoded output, the exact format browsers send when a form is submitted. That makes it easy to test or replicate form posts.

Fixing Broken Links: A URL copied from a document or email sometimes arrives with raw spaces or unescaped & characters that break the link. Encoding cleans it into a clickable, standards-compliant address.

Reading Encoded Parameters: Logs, analytics and APIs frequently store values as %XX sequences. Paste them into the tool and click Decode URL to see the human-readable original text.

Handling International Text: Non-ASCII characters such as accented letters and emoji are converted to UTF-8 percent-encoding (for example %C3%A9 for é), which is required for URLs to work reliably across systems.


FAQs:

FAQ 1: What is URL encoding?
Answer: URL encoding (percent-encoding) replaces unsafe or reserved characters with a % sign followed by their hexadecimal byte value (for example a space becomes %20) so the text stays valid inside a URL.

FAQ 2: What is the difference between "Encode component" and "Encode full URL"?
Answer: "Encode component" (encodeURIComponent) escapes almost every special character and is meant for a single URL part such as a query value. "Encode full URL" (encodeURI) keeps the structural characters of a link (: / ? & = #) untouched and only encodes the unsafe pieces, keeping the whole link readable.

FAQ 3: What does the "Use + for spaces" option do?
Answer: It writes spaces as + instead of %20, producing application/x-www-form-urlencoded output used by HTML form submissions. Decoding always treats + as a space, so the change is fully reversible.

FAQ 4: Does the tool handle non-ASCII characters like emoji?
Answer: Yes. Accented letters, emoji and other non-ASCII characters are encoded to their UTF-8 percent-encoding (for example %E2%98%95 for ☕), which is the correct, standards-compliant way to place them in a URL.

FAQ 5: Can I decode text that was encoded elsewhere?
Answer: Yes. Paste any percent-encoded string into the input and click Decode URL. The tool converts %XX sequences (and + spaces) back into readable characters. If the input contains an invalid sequence, it shows an error message instead of failing silently.

FAQ 6: Is the tool free to use?
Answer: Absolutely. The URL Encode / Decode tool, like every tool on text-toolz.com, is free and requires no registration.

TextToolz

The Ultimate Text Tools

TextToolz works seamlessly to let you convert and design your text. It is fast, reliable and secure. Trusted by thousands of users.