Skip to content
FileKit
Security And EncodingRuns in your browser6 min read

URL Encoder Decoder

This url encoder decoder percent encodes and decodes text, full URLs and query strings directly in your browser. Use it to percent encode url values before they are placed inside a link, or run it in reverse whenever you need to decode url string values that arrived already escaped. A URL can only legally contain a limited set of characters, so anything else, including spaces, ampersands, brackets and most unicode letters, has to be escaped as a percent sign followed by two hexadecimal digits before it can safely travel inside a link.

Loading the tool interface
Files never leave your deviceNo upload wait and no queueNo signup, watermark or file limit

Getting this wrong breaks things in two different directions. Under encoding lets a stray ampersand or equals sign inside a value get misread as the start of a new query parameter, silently truncating or corrupting the data. Over encoding, the more common mistake, escapes characters like the slash or colon that are structurally meaningful to a URL and are not supposed to be touched, which breaks the link entirely.

Everything runs locally using the browser's own encodeURIComponent, encodeURI and matching decode functions, so a URL containing a private query parameter, a session token or an internal path never leaves your machine while you inspect or fix it.

Component mode versus full URI mode

This tool offers the two modes JavaScript itself exposes, because they escape different sets of characters and mixing them up is the single most common URL encoding bug. Component mode uses encodeURIComponent, which escapes everything except letters, digits and a small set of unreserved marks. It is the correct choice whenever you are encoding a single value that will be placed inside a query string, a path segment or a form field, because it also escapes slash, ampersand, question mark and equals, the characters that structure a URL.

Full URI mode uses encodeURI, which assumes you are handing it an entire URL that is already structurally correct, so it leaves slash, colon, question mark, ampersand, equals and hash alone and only escapes characters that are never valid anywhere in a URL, such as spaces and most unicode text. Use full URI mode only when you have a complete address, never on a single parameter value, or you will end up with an unescaped ampersand splitting your data into extra parameters.

  • Use component mode, the same behaviour as encodeURIComponent online, for a single query parameter value, a path segment or a form field.
  • Use full URI mode for a complete address that already has its slashes, colons and query separators in place.
  • Never run full URI mode on a value that itself contains an ampersand or equals sign.
  • Decode mode reverses either encoding automatically and reports an error on malformed percent sequences.

Reading the query string parameter breakdown

Paste a full URL and this built in query string parser reads everything after the question mark using the same URLSearchParams class browsers use internally, then lists every key and its decoded value in a table. That makes it easy to spot a parameter that has been double encoded, a key that is missing a value, or a duplicate key that will silently overwrite an earlier one in most server side frameworks.

Each row shows the raw key and value exactly as they appeared in the query string next to the decoded version, so you can see at a glance whether percent sequences were interpreted correctly. This is often faster than reading the raw string character by character when a URL has more than three or four parameters.

Reserved characters and why encoding exists at all

RFC 3986 defines a small alphabet of reserved characters, including colon, slash, question mark, hash, ampersand and equals, that carry structural meaning inside a URI. Every other byte, called unreserved when it is a letter, digit, hyphen, period, underscore or tilde, can appear literally. Anything outside both sets, which includes spaces, most punctuation and every non ASCII character, must be percent encoded as its UTF-8 byte sequence.

That last point matters for international text. The word café is not one accented character in a URL, it is the letter e followed by the two byte UTF-8 sequence for the accent, encoded as %C3%A9. This tool follows that same UTF-8 based rule, matching how every modern browser and server actually behaves.

Decoding a URL string safely

Decoding reverses percent escapes back into their original characters. A malformed sequence, such as a percent sign followed by something other than two hex digits, is a real error condition in the underlying browser API rather than something that can be silently guessed at, and this tool surfaces that as a clear message instead of throwing an unhandled exception.

Plus signs are a special case worth knowing about. Inside a query string, by long standing web convention rather than the URI specification itself, a literal plus sign represents a space. This tool decodes plus as a space only when you are working with query string values, and leaves a literal plus alone everywhere else, matching how form submissions have worked since the early web.

How this url encoder decoder works under the hood

This url encoder decoder runs encoding and decoding entirely through the browser's native encodeURIComponent, decodeURIComponent, encodeURI and decodeURI functions, so behaviour matches exactly what your own JavaScript code would produce, with no custom escaping table to drift out of sync with the specification. The parameter table is built with URLSearchParams, the same class used by the Fetch API and by frameworks across the ecosystem.

Because everything is a pure text transformation running in memory, there is no size limit beyond what your browser tab can hold, and no request is ever sent anywhere to perform the conversion. That is particularly relevant here since URLs frequently contain session tokens, API keys or other values you would not want logged by a third party service.

Component encoding compared with full URI encoding
CharacterencodeURIComponentencodeURI
/Escaped as %2FLeft alone
?Escaped as %3FLeft alone
&Escaped as %26Left alone
=Escaped as %3DLeft alone
spaceEscaped as %20Escaped as %20

How to use this url encoder decoder

  1. 1

    Paste your text or URL

    Enter a single value, a query string or a complete URL into the input box.

  2. 2

    Choose encode or decode

    Pick the direction you need. Decoding reverses whatever encoding is currently present.

  3. 3

    Pick component or full URI mode

    Use component mode for a single value, full URI mode for a complete, already structured address.

  4. 4

    Review the parameter table

    If you pasted a full URL with a query string, check the breakdown table for each key and decoded value.

Related tools worth bookmarking

Sources and further reading

Frequently asked questions

Common questions about the url encoder decoder.

encodeURIComponent escapes almost everything except letters, digits and a few unreserved marks, making it correct for a single value such as a query parameter. encodeURI assumes the input is already a complete, structurally valid URL and leaves characters like slash and colon untouched, escaping only what is never valid in a URL at all.

The most common cause is running full URI encoding on a single parameter value rather than a complete URL, or the reverse, running component encoding on an entire address and escaping the slashes and colons that were supposed to stay intact. Match the mode to what you are actually encoding and the link will stay valid.

Inside a query string, a literal plus sign has represented a space since the earliest HTML forms, a convention that predates the formal URI specification. This tool applies that rule only to query string values and treats a plus sign literally everywhere else, matching standard browser behaviour.

They are converted to their UTF-8 byte sequence first, and each byte is then percent encoded separately, so a single accented letter typically becomes two or three percent codes in a row. This matches how every modern browser and server encodes non ASCII text in a URL.

It lists every key and value pair found after the question mark in a pasted URL, decoded using the same URLSearchParams logic browsers use internally. It is the fastest way to check whether a long query string is well formed or whether a parameter has accidentally been double encoded.

No. Encoding, decoding and parameter parsing all happen locally in your browser using built in JavaScript APIs. Nothing is transmitted to a server, which matters because URLs often carry session identifiers or API keys that should not be logged elsewhere.