How to Encode and Decode URLs with the Free URL Encoder/Decoder

URL Encoder/Decoder

You paste a link into an email, and it arrives broken: the space in a file name split the address in two, an ampersand was read as a new parameter. URLs only allow a small set of characters, and everything else has to be translated first. That translation is called URL encoding, and the free URL Encoder/Decoder on ilovetool3.com does it in both directions, instantly and in your browser.

What the tool does

URL encoding — also called percent-encoding — replaces every character that is not allowed in a URL with a percent sign followed by two hexadecimal digits. A space becomes %20, an ampersand becomes %26, a question mark becomes %3F. Decoding reverses the process and turns those percent codes back into readable characters.

The page puts it plainly: “It converts characters that are not allowed in a URL — spaces, &, ?, =, non-English letters — into percent-encoded form, so a link or a query value travels without breaking. Decoding reverses it, turning percent codes back into readable characters.” That job comes up constantly: sharing a file whose name has spaces, building a search link with a multi-word query, or passing a value that contains & or = without the browser misreading it.

The URL Encoder/Decoder offers three actions. Encode → encodes everything in the Input box, including the : / ? & and = characters — what you want when encoding a single value to drop inside a larger URL. Encode Full URL encodes only the unsafe characters and leaves a complete URL’s structure untouched. ← Decode turns an encoded string back into readable text. 📋 Copy Output copies the result in one click, and the Output box is read-only, so you cannot accidentally edit the result. The page also answers the privacy question directly: “Q: Does my data get saved? A: No. The encoding runs in your browser.”

How to use it

Open the URL Encoder/Decoder tool. Type or paste your text or URL into Input (placeholder “https://example.com/?name=Ali Khan&city=Lahore”); the converted result appears in the read-only Output box.

Click Encode → to encode a value, Encode Full URL to encode a whole address while keeping its structure, or ← Decode to decode an encoded string. Then click 📋 Copy Output. If you try to decode something invalid, the tool shows a red message, “Invalid encoded URL!”, and the Output box keeps showing the previous result — so always read the message before copying.

Worked examples from the live tool

We tested the live tool with six different inputs. Every figure below is the tool’s exact output.

Example 1 — encode a simple phrase. Encoding “hello world” gave hello%20world. The space became %20, and nothing else changed — the most common encoding you will ever do.

Example 2 — encode a full query URL. Encoding “https://example.com/search?q=hello world&lang=en” with Encode → gave https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dhello%20world%26lang%3Den. Every structural character was encoded too — colons, slashes, question mark, equals signs and the ampersand. That is correct for a single value, but the result is no longer a clickable address.

Example 3 — encode a whole URL properly. Running the same address through Encode Full URL instead gave https://example.com/search?q=hello%20world&lang=en. The structure survived — : / ? & = are all still there — and only the space was encoded to %20. This is the button to use for a complete link.

Example 4 — encode non-English characters. Encoding “café ☕” gave caf%C3%A9%20%E2%98%95. The é became %C3%A9 and the coffee emoji became %E2%98%95. Non-English letters and emoji are encoded as UTF-8 bytes, each byte a percent code — which is why one emoji becomes three codes. A link with Urdu text, an accent or an emoji survives the journey.

Example 5 — encode characters with special meaning. Encoding “a+b=c&d” gave a%2Bb%3Dc%26d. The plus sign became %2B, the equals sign became %3D and the ampersand became %26. This matters because + and & have jobs inside a URL: & separates parameters and + is sometimes read as a space.

Example 6 — decode back, and decode something invalid. Decoding “hello%20world” gave hello world — the round trip works exactly. Decoding “https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dhello%2520world” gave https://example.com/search?q=hello%20world: decoding runs once only, so %2520 became %20, not a space. Finally, decoding “%ZZ” gave the red message “Invalid encoded URL!” — ZZ is not a valid hexadecimal pair — and the Output box kept the previous result.

Common mistakes

Encoding a full URL twice. This is the mistake the tool’s own page warns about: “Encoding a full URL twice, which turns %20 into %2520 and breaks the link.” Once a space is %20, encoding again turns the % into %25, giving %2520 — and decoding that once only gives back %20, not a space. Encode once, and check the result before you encode again.

Using Encode → on a whole link. If you encode a complete address with Encode →, the : / ? & = all get encoded and the result is not a clickable link. That button is for a single value, like a search term or a file name. For a whole URL, use Encode Full URL.

Forgetting that decoding runs once. A string encoded twice needs decoding twice. If your decoded result still contains %20 or %26, it was double-encoded — decode it a second time instead of assuming the tool failed.

Copying a stale output after an error. As Example 6 shows, the Output box does not clear when a decode fails. If you see “Invalid encoded URL!”, the text in the Output box is from your previous conversion. Fix the input and convert again before copying.

Frequently asked questions

What does URL encoding do?

It replaces characters that are not allowed in a URL — spaces, &, ?, =, non-English letters and emoji — with percent codes like %20, so the link travels without breaking. Decoding turns the codes back into the original characters.

What is the difference between Encode and Encode Full URL?

Encode converts everything, including the : / ? & = that give a URL its structure — use it for a single value. Encode Full URL leaves those structural characters alone and only encodes the unsafe ones — use it for a complete link you want to keep clickable.

Can I decode a URL that was encoded twice?

Yes, but you have to decode it twice. The first decode turns %2520 into %20; the second turns %20 into a space. Each click of ← Decode runs one pass.

Try it yourself

Next time a link breaks because of a space or an ampersand, open the URL Encoder/Decoder, paste the address into Input, and click Encode Full URL. If you are building a query value instead, use Encode →; to read a link full of percent codes, click ← Decode — and if you see “Invalid encoded URL!”, fix the input before you copy anything. If you also work with encoded text in other formats, the Base64 Encoder/Decoder blog explains a similar two-way conversion for text that has to travel through systems that only accept plain characters.

1 thought on “How to Encode and Decode URLs with the Free URL Encoder/Decoder”

  1. Pingback: How to Create a QR Code with the Free QR Code Generator

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top