URL Encoder / Decoder and Query String Parser

Percent-encode parameters, decode unreadable URLs and see the protocol, host, path and every query string parameter separately.

Input

Result

https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Ddeveloper%20tools%26lang%3Den%26tags%3Djson%2Cjwt%23top

URL breakdown

protocol
https:
host
example.com
path
/search
hash
#top
origin
https://example.com
ParameterDecoded value
qdeveloper tools
langen
tagsjson,jwt

Use via API

Applies or reverses percent-encoding.

POSThttps://enhanced.dev.br/api/v1/encoding/url
JSON body parameters
Body (JSON)TypeDescription
text *stringText or URL.
mode"component" | "uri" | "decode"encodeURIComponent, encodeURI or decoding. Default: "component".

Request example

curl -X POST "https://enhanced.dev.br/api/v1/encoding/url" \
    -H "Content-Type: application/json" \
    -d '{"text":"busca por ferramentas & dev","mode":"component"}'

Response

{
  "ok": true,
  "data": {
    "mode": "component",
    "output": "busca%20por%20ferramentas%20%26%20dev"
  },
  "meta": {
    "version": "v1"
  }
}
  • Errors return { ok: false, error: { code, message } } with an HTTP 4xx/5xx status.
  • Free, no API key required. Limited to 120 requests per minute per IP.
  • CORS enabled: call it straight from the browser on any domain.

How to use

  1. Paste a URL or some text into the input.
  2. Choose encodeURIComponent for parameter values, encodeURI for full URLs or Decode to reverse.
  3. Check the URL breakdown below: components and parameters, already decoded.
  4. Copy the result with one click.

Use cases

  • Building links with parameters that contain spaces, accents, & or =.
  • Reading redirect URLs and OAuth callbacks with nested parameters.
  • Debugging UTM and tracking parameters in marketing campaigns.
  • Checking how a form serialized the submitted fields.

Technical concepts

encodeURIComponent versus encodeURI

encodeURIComponent escapes every reserved character (; , / ? : @ & = + $ #), which is right for individual parameter values. encodeURI keeps those characters because it assumes you are encoding a complete URL, escaping only what is illegal in it, such as spaces and accents.

Percent-encoding

Every byte outside the allowed set is written as % followed by two hexadecimal digits. Non-ASCII characters are converted to UTF-8 first, which is why é becomes %C3%A9 (two bytes).

The + sign in query strings

In the application/x-www-form-urlencoded format used by HTML forms, a space is encoded as +. The decoder on this page treats + as a space, matching URLSearchParams.

Frequently asked questions

Why do I get 'URI malformed' when decoding?

The input contains a % that is not followed by two valid hexadecimal digits, or a sequence that does not form valid UTF-8, such as an incomplete %E0%A4.

Should I encode the whole URL with encodeURIComponent?

No. That would escape :// and /, breaking the URL. Encode only the parameter values with encodeURIComponent.

Are repeated parameters shown?

Yes. Each occurrence of a repeated key, such as tag=a&tag=b, gets its own row in the table.

Related tools