Home › Generators & Text Tools › URL Decoder

URL Decoder

The URL Decoder turns percent-encoded URLs back into readable text — and, with one switch, does the reverse and encodes text into a URL-safe form. Paste a messy link full of %20 and %3F, and see the real address underneath in a single click.

https://example.com/my page?q=hello world
Decoded · 57 characters in, 41 characters out · 8 percent sequences replaced.

How it works

A URL can only safely contain a limited set of characters: letters, digits, and a few marks like hyphens and dots. Anything else — a space, a question mark, an ampersand, a non-English letter — has to be disguised before it can travel inside a link. That disguise is called percent-encoding: the character is replaced by a percent sign followed by two hexadecimal digits that stand for its code. A space, whose code is 32 in decimal and 20 in hexadecimal, becomes %20. A question mark becomes %3F, a slash becomes %2F, and an exclamation mark becomes %21.

Decoding reverses the process. The tool scans your text for every % followed by two hexadecimal digits and swaps each one back for the character it stands for. It also handles the plus sign: in form data and many search links, a space is written as + instead of %20, so decode mode treats + as a space by default. A real plus sign is written as %2B in an encoded URL, and the decoder turns %2B back into a genuine +, so the two are never confused. If you would rather keep plus signs as they are — for example, when decoding a maths expression — switch the plus option to "Keep + as a plus sign".

Encode mode does the reverse job. Paste plain text — a page title, a search phrase, a full address with spaces — and the tool turns every character that is not safe in a URL into its %XX form, so the result can be pasted into a link, a form, or a query string without breaking. The Swap & reverse button moves the result into the input box and flips the mode, so you can decode a link, edit the readable text, and encode it again in two clicks.

The tool checks your input before it decodes. A lone percent sign at the end of the text, or a percent sign followed by something that is not two hexadecimal digits — %ZZ, %2, or %G1 — is not valid encoding, and the tool tells you exactly where the problem is instead of handing you a half-decoded result. Everything runs in your browser: the link is never uploaded, which matters when you are decoding a link that contains a token, a password reset code, or a private search.

Encoded: % + two hex digits = one character · space = %20 · ? = %3F · / = %2F · + in form data = space

Worked example

A reader copies a link from an email, but it arrives mangled: https%3A%2F%2Fexample.com%2Fmy%20page%3Fq%3Dhello%20world. She wants to see the real address before she clicks it.

Step 1: She pastes the encoded link into the box, leaves the mode on "Decode URL", and presses Decode URL.
Step 2: The tool finds the percent sequences one by one: %3A is a colon, %2F is a slash (three times), %20 is a space (twice), %3F is a question mark, and %3D is an equals sign — eight sequences in total.
Step 3: Each sequence is swapped back for its character, and the input shrinks from 57 characters to 41.
Step 4: The result reads https://example.com/my page?q=hello world — the real address, with the page name "my page" and the search "hello world" plain to see.

The tool shows exactly this result: the headline reads https://example.com/my page?q=hello world, and the note underneath reads "Decoded · 57 characters in, 41 characters out · 8 percent sequences replaced." Press Swap & reverse and the readable address goes back into the box in Encode mode, ready to be turned back into the encoded link. Try the same input above and you will get the same answer — decoding, unlike shuffling, is exact.

FAQ

What does a URL decoder do?

A URL decoder turns percent-encoded text back into readable text. A space becomes %20 in a URL, an exclamation mark becomes %21, and a question mark becomes %3F. The decoder reverses that, so https%3A%2F%2Fexample.com%2Fmy%20page reads as https://example.com/my page again.

Why are some characters written as %20 in a URL?

URLs can only contain a limited set of characters safely. Spaces, question marks, ampersands, and non-English letters are replaced with a percent sign followed by two hexadecimal digits that stand for the character's code — that is called percent-encoding. It keeps the link working when it is shared, copied, or sent through systems that would break on a plain space.

What is the difference between decoding and encoding a URL?

Decoding turns an encoded URL back into readable text, for example turning %20 back into a space. Encoding does the reverse: it turns plain text into the percent-encoded form a URL needs, for example turning a space into %20. This page has a mode switch, so the same box does both jobs.

Does this tool treat + as a space?

Yes, in decode mode a plus sign is treated as a space, because that is how form data and many search links write spaces. A literal plus sign in a URL is written as %2B, and the decoder turns %2B back into a real plus sign, so the two are never confused.

What happens if my URL is badly encoded?

The tool checks the input before it decodes it. A lone percent sign, or a percent sign followed by something that is not two hexadecimal digits — for example %ZZ or %2 — is an error, and the tool tells you where the problem is instead of giving you a broken result. Fix the bad sequence and decode again.