Skip to content
SDETRole
SDETRole

Test Design & Dev Utilities

URL Encoder / Decoder

Percent-encode or decode text, parse query strings, break down URLs.

Runs entirely in your browser No sign-up

Plain text

0 chars

Encoded

About this mode

encodeURIComponent: use for a single query value or path segment. Escapes everything except A-Z a-z 0-9 - _ . ! ~ * ' ( ).

About this tool

Encoding bugs are a reliable source of API defects: a plus sign that turns into a space, an ampersand in a value that splits a parameter, a redirect URL that is encoded twice. This tool makes the three common encodings explicit. Component mode matches encodeURIComponent for single values, Full URI mode matches encodeURI for whole URLs, and Form mode matches what browsers send for HTML forms. The query parser lists every parameter in order with its decoded and raw form, keeping repeated keys such as tag=a&tag=b that many tools silently merge. The URL breakdown uses the browser’s WHATWG URL parser, the same one fetch() uses.

How to use it

  1. Choose Encode or Decode and the encoding mode, then paste your text.
  2. Use Swap to feed the output back in and check a round trip.
  3. Switch to Query parser to inspect parameters, including repeated and empty ones.
  4. Use URL breakdown to see protocol, host, port, path segments, query and fragment separately.

URL Encoder / Decoder FAQ

When should I use encodeURIComponent instead of encodeURI?

Use encodeURIComponent for a single piece, such as one query value or path segment, because it escapes & = ? / and #. Use encodeURI only on a full URL that is already correctly structured, since it leaves those characters alone.

Why does + sometimes mean a space?

In application/x-www-form-urlencoded data, used by HTML forms and many query strings, + represents a space. In a path, + is a literal plus sign. If a value can contain +, encode it as %2B.

What does “Malformed percent-encoding” mean?

A % must be followed by two hex digits that form valid UTF-8 together with any neighbouring escapes. A lone % or a truncated multi-byte sequence such as %E2%82 cannot be decoded.

Type to search across SDETRole.

Full-text search by Pagefind · runs in your browser Open search page →