URL Decoder

Convert a percent-encoded string, like the kind you find in a query string or a copied link, back into its original, human-readable text. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-18

Overview

Introduction

Copy a link out of a browser's address bar or an API log and you'll often see %20, %2F, and similar sequences standing in for spaces and punctuation. This tool reverses that encoding so you can read or reuse the original text.

It's most useful when you're staring at a raw access log, a webhook payload, or a redirect URL and just need to know what value is actually being carried, rather than mentally decoding %XX sequences one at a time.

What Is URL Decoder?

URL decoding reverses percent-encoding: each %XX sequence gets interpreted as a hexadecimal byte, and the resulting bytes are decoded back into text.

It's the mirror image of URL encoding. Anywhere text was escaped to survive being embedded in a URL, this recovers the original characters, including reserved ones like & and + that only look structural until they're decoded.

How URL Decoder Works

The tool passes your input through the browser's native decodeURIComponent function, which interprets each percent-encoded byte sequence as UTF-8 and reconstructs the original characters, throwing an error if a sequence is malformed.

Because decoding is byte-oriented, multi-byte UTF-8 sequences (used for non-ASCII characters like emoji or accented letters) get reassembled correctly as long as every constituent %XX byte is present. A truncated or corrupted sequence is exactly what triggers the malformed-input error instead of returning garbled text.

When To Use URL Decoder

Use it to read a percent-encoded query string from server logs, inspect a copied redirect URL, or verify that a value you encoded elsewhere decodes back to what you expect.

It also helps when debugging integrations: if an API returns a percent-encoded value where you expected plain text, decoding it here quickly tells you whether the encoding itself is the bug or just an intermediate representation.

Often used alongside URL Encoder.

Features

Advantages

  • Runs entirely client-side, so pasted URLs or tokens never leave your browser.
  • Surfaces malformed encoding as a clear error instead of silently producing garbled text.
  • Matches native browser decoding behavior exactly.

Limitations

  • Doesn't convert + to a space - that's a separate, form-encoding-specific convention.
  • Decoding an already-decoded string does nothing useful, since there's no percent-encoding left to interpret.

Percent-Decoding vs. Form Decoding

Percent-Decoding vs. Form Decoding
Percent-decode (this tool)Form decode (application/x-www-form-urlencoded)
Converts %20 to a spaceYesYes
Converts + to a spaceNoYes
Used forQuery string and path valuesHTML form submissions

Examples

Decoding a query string value

Input

c%2B%2B%20tutorials%20%26%20guides

Output

c++ tutorials & guides

Each %XX sequence converts back to its original character, including reserved characters like + and &.

Decoding non-ASCII text

Input

caf%C3%A9%20%E2%98%95%20%E6%97%A5%E6%9C%AC%E8%AA%9E

Output

café ☕ 日本語

Consecutive %XX bytes are interpreted together as UTF-8 and reassembled into the original multi-byte characters.

A malformed percent sequence

Invalid input

100%zz

Parser error

Error: Input contains an invalid percent-encoding sequence.

%zz isn't a valid hexadecimal byte, so decodeURIComponent throws a URIError instead of guessing what the character was meant to be. The fix is to correctly encode any literal % as %25.

Corrected version

100%25zz

A literal plus sign

Input

a+b

Output

a+b

Percent-decoding has no special rule for +, so it passes through unchanged; only form-encoded (application/x-www-form-urlencoded) values treat + as a space.

Best Practices & Notes

Best Practices

  • Decode individual query parameter values rather than an entire URL to avoid corrupting the URL's structural characters.
  • If you're processing form submissions, convert + to a space before decoding, since that's a separate convention this tool doesn't apply.
  • Pair with the URL encode tool to sanity-check round-trips while debugging.
  • When a decode fails, check the exact position of the reported % first; a truncated copy-paste or a log line cut off mid-sequence is the most common cause.
  • Treat a decoding error as a signal to inspect the source of the value, not something to work around by stripping the stray % and re-decoding. That usually just hides a real upstream bug.

Developer Notes

This wraps the native decodeURIComponent function with no additional leniency layered on top, so a malformed sequence throws exactly as it would in your own code. decodeURIComponent processes the input as a sequence of UTF-8 bytes: each %XX is decoded to a raw byte, consecutive bytes belonging to the same multi-byte UTF-8 character are combined, and the result is reassembled into a JavaScript string. Any byte sequence that isn't valid UTF-8, whether from a truncated multi-byte character or a random invalid hex pair, causes the function to throw a URIError rather than substitute a replacement character, which is why this tool reports a clear error instead of ever returning mangled or partially decoded text.

URL Decoder Use Cases

  • Reading a percent-encoded query string copied from a server access log
  • Inspecting a redirect URL to see what value it actually carries
  • Verifying that an encoded value round-trips correctly during debugging
  • Diagnosing whether an unexpected %XX sequence in application data is the bug, or just an intermediate encoded representation

Common Mistakes

  • Assuming + will decode to a space. It won't, since that's a form-encoding rule, not part of percent-decoding.
  • Decoding a string that was never encoded, which just returns the same text unchanged and can mask a different bug.
  • Decoding a full URL instead of a single value, which also unescapes characters that were deliberately encoded to preserve the URL's structure.
  • Treating a decoding error as random noise instead of a sign of truncated or corrupted input worth tracing back to its source.

Tips

  • If decoding throws an 'invalid' error, check for a stray % that isn't followed by two hex digits.
  • Use the encode tool on the output afterward to confirm you get back exactly the string you started with.
  • If a value contains %XX sequences that don't decode to anything readable, confirm it wasn't encoded twice before assuming it's genuinely malformed.

References

Frequently Asked Questions