Skip to content
Encoders & Decoders

Last updated:

URL Decode Online

URL decode text in seconds. Paste a percent-encoded string and this free tool turns codes like %20 back into readable text as you type, with an optional mode for form data where a plus sign means a space. Everything runs in your browser, so nothing is uploaded.

URL-encoded text

0 characters · 0 lines

Decoded text

Loading tool
0 characters · 0 linesLive preview

Your text is processed in your browser and never uploaded.

More free tools you may need next.

How to use URL Decode

  1. 1

    Paste the encoded text

    Paste the percent-encoded text into the left box. It can be a whole URL, a query string or a single value copied from a log or an address bar.

  2. 2

    Choose how to treat plus signs

    By default a plus sign stays a plus sign, which is right for paths and standard URLs. If the text came from an HTML form or a form-style query string, tick Treat + as a space.

  3. 3

    Copy it or encode it again

    The readable text appears on the right as you type. Press Copy to use it, or press the swap button to encode it again with URL Encode.

What is URL decoding?

URL decoding turns percent codes back into the characters they stand for. %20 becomes a space, %26 becomes an ampersand and %C3%A9 becomes the letter é. It's the reverse of URL Encode.

Percent-encoding exists because URLs can only carry a small set of characters. Whenever something else has to travel inside a URL, it is written as codes, and decoding is how you read it again.

Where percent codes come from

  • Search queries and filters in a browser's address bar.
  • Redirect and return addresses passed as parameters, such as a login page remembering where you came from.
  • Server logs and analytics reports, which store addresses the way they were requested.
  • Links copied from email or chat apps.
  • API requests that carry text in the query string.

A worked example

A value copied from a query string:

Text
name%3DAli%20%26%20Sara%2C%20city%3DLahore%3F

After decoding, it reads:

Text
name=Ali & Sara, city=Lahore?

Non-English text works the same way. The text caf%C3%A9 decodes to café, because the two codes %C3 and %A9 are the two UTF-8 bytes of the letter é.

When a plus sign means a space

In a standard URL, a plus sign is an ordinary character. In HTML form data (application/x-www-form-urlencoded), which is also how many query strings are written, a plus sign stands for a space. Which one you have depends on where the text came from.

The order matters. Plus signs must be turned into spaces before the percent codes are decoded. If you decode first, a real plus sign that was written as %2B becomes a + and would then be mistaken for a space. This is what the Treat + as a space option does:

Text
Input:                C%2B%2B+guide
Option off (default): C+++guide
Option on:            C++ guide

Double-encoded text

Sometimes text is encoded twice, for example when an address is passed as a parameter inside another address. A space then appears as %2520, because the % of %20 was itself encoded as %25.

If you know the text was encoded twice, paste the result back in to decode the second layer. Decode only as many times as the text was encoded. If you're not sure, stop after one round and check where the text came from, because decoding too far turns text that was meant to contain a literal %20 into a space.

Why decoding fails

These are the usual reasons a string can't be decoded:

  • A % that isn't followed by two hexadecimal digits, such as the stray percent sign in 100%.
  • Codes that don't form valid UTF-8. A single code such as %E9 is not a complete character in UTF-8. It usually comes from an older system that used Latin-1.
  • Text that was never encoded. A literal percent sign, for example in a discount of 50%, can't be told apart from the start of a code.

URL decoding in your own code

JavaScript
const encoded = "C%2B%2B+guide";

// Plain percent-decoding: a plus sign stays a plus sign
console.log(decodeURIComponent(encoded)); // C+++guide

// Form data: turn + into a space first, then decode
console.log(decodeURIComponent(encoded.replace(/\+/g, " "))); // C++ guide
Python
from urllib.parse import unquote, unquote_plus

encoded = "C%2B%2B+guide"

print(unquote(encoded))       # C+++guide
print(unquote_plus(encoded))  # C++ guide

Is it safe to paste private text here?

Decoding runs in your browser, and what you paste is not sent to our servers. That makes it a sensible place to read links that contain tokens or personal details. The Privacy Policy has the details.

Frequently asked questions

Paste the encoded text into the left box. The decoded text appears on the right straight away. Press Copy to use it.

Paste only the parameter's value, the part after the equals sign. If the value came from an HTML form or a form-style query string and shows plus signs where spaces should be, tick Treat + as a space.

Tick the Treat + as a space option. It turns every + into a space before the percent codes are decoded, which is the order form data requires. A real plus written as %2B is kept as a plus.

In a standard URL a plus is an ordinary character. Only in HTML form data does it mean a space, so the tool leaves it alone unless you ask for the form behavior.

It's a space that was encoded twice. %20 is a space and %25 is the percent sign itself, so %2520 decodes once to %20 and a second time to a space.

Most often there is a % that isn't followed by two hex digits, or codes that don't add up to valid UTF-8 text. Check for a stray percent sign.

Yes. Paste the full address and every code in it is decoded. The result is meant for reading, not for reuse as a link, because decoded characters such as & and ? can change the meaning of a URL.

Yes. Codes are read as UTF-8, so %C3%A9 becomes é and a group such as %E2%82%AC becomes the euro sign.

No. Everything runs in your browser and your text never leaves your device.