URL Decode Online — decodeURIComponent & decodeURI

Reverse percent-encoding on query strings and URLs. Opens in Decode mode — pick component, full URI, or form-urlencoded scope, then click Convert.

Loading…
URL encoder & decoder — query strings vs full URLs
Modern browsers expose encodeURIComponent for isolating parameter keys and values, while encodeURI targets entire href strings that still need :, ?, # and other structural symbols intact. FastMinify mirrors both APIs so you can reproduce backend behaviour during debugging.

Choosing the right encoding mode

Encode component mirrors encodeURIComponent: spaces become %20, slashes become %2F, ampersands become %26. Perfect when you craft query pairs programmatically or reverse-engineer analytics URLs. Encode URI mirrors encodeURI: reserved structural characters remain untouched while Unicode code points still gain percent escapes. Form data mirrors application/x-www-form-urlencoded: like component mode but spaces become + instead of %20. Decode performs the inverse transformation using decodeURIComponent or decodeURI respectively. Click Convert to run — conversions are not automatic while you type.

Choosing an encoding scope

Query component (encodeURIComponent)
Encodes every reserved character in a single parameter name or value. Spaces become %20, slashes become %2F, ampersands become %26. Use this when building ?key=value pairs for fetch, OAuth scopes, or analytics payloads.
Full URL (encodeURI)
Escapes Unicode and unsafe bytes while keeping URL scaffolding intact — :, /, ?, #, and & stay literal. Use when sanitizing an almost-complete href without mangling delimiters.
Form data (application/x-www-form-urlencoded)
Encodes like encodeURIComponent but turns spaces into + instead of %20. This mirrors how browsers serialize HTML <form> fields in POST bodies — not how query strings in links are typically built.

Quick comparisons

encodeURIComponent for parameters

Sample input

https://api.example.com/v2/search?q=hello world&filter=a&b&category=home office&price=$100&currency=USD&region=eu-west-1&sort=relevance&page=2&trace=abc123

Sample output

https%3A%2F%2Fapi.example.com%2Fv2%2Fsearch%3Fq%3Dhello%20world%26filter%3Da%26b%26category%3Dhome%20office%26price%3D%24100%26currency%3DUSD%26region%3Deu-west-1%26sort%3Drelevance%26page%3D2%26trace%3Dabc123

encodeURI keeps URL scaffolding

Sample input

https://shop.example.com/catalog?tag=sale%20items&sort=price

Sample output

https://shop.example.com/catalog?tag=sale%2520items&sort=price

Explore neighbouring tools

Binary payloads often ride alongside URLs — use the Base64 encoder. Escaping markup before injecting strings into templates belongs to the HTML entities utility, and shipping compressed bundles stays painless via CSS minification.

URL encoding FAQ

Solidify percent-encoding behaviour before touching APIs

Why does encodeURIComponent throw URI malformed?

decodeURIComponent surfaces errors when percent sequences are incomplete (% alone) or reference invalid UTF-8 bytes.

Should spaces become + or %20?

encodeURIComponent yields %20 — the default for REST query strings. Use the Form data scope when you need + for spaces, matching application/x-www-form-urlencoded bodies from HTML forms.

Does encodeURI protect XSS?

No — escaping URLs prevents delimiter breakage but never substitutes contextual HTML encoding.

Can I encode entire UTF-8 paths?

Yes — encodeURIComponent encodes outside ASCII automatically while preserving surrogate pairs.

Does FastMinify log URLs?

No server round-trip occurs; everything executes locally.

When should I use decodeURIComponent?

Use it to reverse strings produced by encodeURIComponent—typically query parameter names and values—before displaying or re-encoding them.

Does the tool handle non-ASCII text?

Yes. UTF-8 sequences are percent-encoded the same way modern browsers do before a request leaves the client.

Can I mix encodeURI and encodeURIComponent?

Usually you pick one strategy per layer: encodeURI for an almost-complete href, encodeURIComponent for each key and value you append to the query string.

Encoding

Encode or decode Base64, URL components and HTML entities — client-side only.

Explore other tool categories

Minify

Shrink code and assets for production — minify JavaScript, CSS, HTML, JSON and XML before gzip or CDN deploy.

Beautify

Make code readable with consistent indentation — beautify JavaScript, CSS, TypeScript, SCSS, LESS, Markdown, GraphQL, SQL, YAML and more in your browser.

Unminify

Expand minified or compressed code — unminify JavaScript, CSS, TypeScript, SCSS, LESS, SQL, YAML and other formats when debugging or reviewing.

Conversion

Transform data between JSON, YAML, XML and CSV locally — no server uploads.

JSON Tools

Validate, format, diff and explore JSON payloads — complementary to minifiers and converters.

SVG Tools

Preview, optimize with SVGO, export Data URI, resize, beautify, convert to JSX and validate SVG — all in your browser.

DevOps & Infra

Terraform HCL format/validate/minify, Dockerfile format & lint, Docker Compose and .env validation.

CI/CD

GitHub Actions and GitLab CI — format YAML and check workflow/job structure in your browser.

Logs & observability

Line-oriented JSON/NDJSON and Nginx/Apache access logs — format, filter, validate, and CSV/TSV.

Kubernetes

Multi-doc manifests, structural validate, Ingress/Deployment starters, and Helm values formatting.

Networking / IP

CIDR, subnets, and IPv4/IPv6 helpers — in your browser.

Security & tokens

JWKS, X.509 certificates, and secrets scan — browser-local.

API & schemas

OpenAPI tools to format, validate, and lint your specs.

Developer utilities

Timestamps, UUID, ULID, Nanoid, cron, passwords, regex, slugify, number bases, case, text diff, and chmod — all client-side.

Serialization

Serialize and deserialize PHP data structures beside JSON workflows.