Data Processed in your browser Free

URL Encode / Decode

Percent-encode text so it's safe to use in a URL query string, or decode an already-encoded URL component back to readable text.

Try it now

🔒 Your input stays in your browser — nothing is sent to a server.

Or try an example

How to use URL Encode/Decode

  1. Type or paste text or a URL component into the box.
  2. Click "Encode" to percent-encode it, or "Decode" to reverse it.
  3. Copy the result.

Common URL encoding errors, explained

Landed here searching for one of these exact messages? Here's what each one means and how to fix it — or paste the string into the tool above and click Diagnose for an automatic breakdown of what's happening and why.

"URIError: URI malformed"

JavaScript — decodeURIComponent()URIError: URI malformed

This fires when you try to decode a string that isn't valid percent-encoding — usually a stray % not followed by two hex digits, or a percent-encoded sequence that was cut off partway through (common when a string gets truncated or copy-pasted incompletely).

Broken (literal % not itself encoded)
100% off
Fixed (encoded first)
100%25%20off

Every literal % in the original text needs to itself be encoded as %25 before decoding will work — a raw % followed by non-hex characters is exactly what triggers this error. Paste the string above and click Encode to produce a version that decodes cleanly.

%20 vs. + for encoding a space

QuickTiny's encoder always outputs %20 for a space, matching JavaScript's encodeURIComponent and the RFC 3986 percent-encoding standard used in URL paths and query values. A literal + for a space is a separate, older convention — application/x-www-form-urlencoded, used by HTML form submissions and encoders like PHP's urlencode() — not a different standard for the same thing. The two aren't interchangeable: decoding a + as a literal plus sign, or leaving a %20 undecoded, are both common sources of "why does my URL have a plus sign / %20 in it" confusion.

encodeURI vs. encodeURIComponent — which one is this?

This tool matches encodeURIComponent: it encodes everything that isn't a plain letter, digit, or a small set of unreserved characters — including &, =, /, and :. That's correct for encoding a single value (a query parameter, a path segment) but wrong for encoding a full URL, since it would also encode the :// and any & that need to stay literal for the URL to work. If you're encoding a complete URL rather than one piece of it, encode only the individual values before assembling them, not the whole string.

Encoding one value (correct use)
a b&c
Result
a%20b%26c

Double-encoded URL (%2520 instead of %20)

If you see %25 followed by what looks like another encoded sequence — like %2520 instead of %20 — the string has been percent-encoded twice. This usually happens when a value already containing %20 gets passed through an encoding step a second time, re-encoding the % itself into %25. Decode it twice to recover the original value: once to turn %2520 into %20, and again to turn that into an actual space.

Key benefits

Privacy

URL Encode/Decode runs entirely in your browser using local JavaScript. Your files and text are processed on your own device and are never uploaded to QuickTiny's servers.

Frequently asked questions

What characters get encoded?

Reserved and unsafe characters for a URL component (like spaces, &, ?, #, and non-ASCII characters) are converted to percent-encoded sequences.

Does this encode a full URL or just a component?

It encodes the whole input as a single component, matching JavaScript's encodeURIComponent. Don't use it on a full URL that already contains :// or you'll encode those characters too.

Why does decoding sometimes fail?

Decoding fails if the input contains a % that isn't followed by a valid two-digit hex code — that's standard URL-encoding validation.

Why do I get "URIError: URI malformed" when decoding?

The string being decoded contains a stray % that isn't followed by two valid hex digits — often a truncated or incompletely-copied percent-encoded sequence, or a literal % that was never encoded itself (as %25). Encode the original text above first, then decode that to confirm it round-trips.

What's the difference between %20 and + for a space?

%20 is standard percent-encoding (RFC 3986), used in URL paths and query values — this tool always produces %20. A literal + for a space is a separate, older convention from HTML form submissions (application/x-www-form-urlencoded), not this kind of encoding. They aren't interchangeable when decoding.

Should I use this on a full URL or just part of it?

Just one piece — a query parameter value or path segment. This matches JavaScript's encodeURIComponent, which encodes everything including & and : and /, so running it on a complete URL would break the :// and any & separating query parameters.

Why does my string have %2520 instead of %20?

It's been percent-encoded twice — the first encoding's % got encoded again into %25. Decode it twice: once to get back to %20, and again to get the actual space.