Skip to main content

URL Encoder / Decoder

Percent-encode text for safe use in a URL, or decode an encoded URL back into readable form.

URLs may only contain a restricted set of characters, so anything else — spaces, ampersands, non-English letters — must be escaped as percent sequences.

This tool runs entirely in your browser

This tool runs entirely in your browser. The data you paste is processed on your device and never sent to Filorra.

That is not a small detail for developer tools. API responses, tokens, config files, and log excerpts routinely contain credentials and customer data, and pasting them into a server-side tool means disclosing them to a third party.

How to use URL Encoder / Decoder

  1. Paste your text or URL

    Either a raw value to encode or an encoded string to decode.

  2. Encode or decode

    The browser's native functions handle the conversion.

  3. Copy the result

    Generated locally, never transmitted.

The encodeURI / encodeURIComponent distinction

Choosing the wrong one of these is behind a large share of broken query strings, and the difference is worth committing to memory.

`encodeURI` is for a complete URL. It deliberately leaves the structural characters alone — `:`, `/`, `?`, `&`, `=`, `#` — because they do the work of separating the parts of the address. Running it over a whole URL escapes the spaces and accents without destroying the structure.

`encodeURIComponent` is for a single value going *inside* a URL: one query parameter, one path segment. It escapes those structural characters too, which is exactly what you want, because a value containing `&` or `=` would otherwise be read as the start of another parameter.

The rule is simple: encoding a whole URL, use `encodeURI`; encoding one value you are about to place into a URL, use `encodeURIComponent`. The second is what you need far more often.

The plus sign problem

A `+` in a URL is genuinely ambiguous, and it produces bugs that are hard to spot because they only affect some inputs.

In a query string, historic HTML form encoding treats `+` as a space. In a path segment, `+` is a literal plus. So a query parameter carrying "C++" or an email address with a plus tag can arrive at the server as "C " or with the plus silently converted.

The fix is to percent-encode it as `%2B` whenever it is meant literally. `encodeURIComponent` does not escape `+` — it is a legal character — so if your value may contain one and the receiving system uses form decoding, replace it explicitly.

Double encoding

Encoding an already-encoded string turns every `%` into `%25`, so `%20` becomes `%2520`. The result usually still looks vaguely right, which is why it survives to production.

It typically happens when a value is encoded by application code and then again by a framework, or when an encoded URL is passed through a redirect that encodes it a second time. The symptom is literal `%20` sequences appearing in your page text.

When debugging, decode the string repeatedly until it stops changing. If it took two passes to become readable, you have found a double-encoding bug upstream.

When to use URL Encoder / Decoder

  • Building a query string containing user-supplied text.
  • Decoding a long tracking URL to see the actual parameters.
  • Escaping a redirect target passed as a query parameter.
  • Debugging characters that arrive mangled at an API.

Common problems

My query parameter is truncated at an ampersand.
The value was not encoded with encodeURIComponent, so its & was read as a parameter separator.
Plus signs became spaces.
Form-style decoding treats + as a space. Encode literal plus signs explicitly as %2B.
I see %2520 in my URLs.
Double encoding — the string was encoded twice. Find where the second pass happens rather than decoding twice to compensate.
Encoding the whole URL broke it.
encodeURIComponent escapes the structural characters. Use encodeURI for a complete URL and encodeURIComponent only for individual values.

Frequently asked questions

Is my data sent anywhere?
No. The browser's native encoding functions run locally.
What is the difference between encodeURI and encodeURIComponent?
encodeURI preserves URL structure characters and suits a complete URL. encodeURIComponent escapes them too and suits a single parameter value.
Why did my plus sign turn into a space?
Form-style query decoding interprets + as a space. Encode it as %2B when it is meant literally.
What causes %2520 to appear?
Double encoding. A string that already contained %20 was encoded again, turning its percent sign into %25.

Learn more

Guides and answers that explain how this tool's job actually works.