URL Encoder, Decoder & Query String Parser — Free Online Tool
Percent-encode and decode URLs with encodeURIComponent or encodeURI, toggle + as space, and parse full URLs into clean decoded query parameter tables.
URL Encoder & Decoder
How to Use This Tool
- 01 Choose Encode to convert plain text or raw URLs into percent-encoded form, or choose Decode to turn %XX sequences back into readable UTF-8 text.
- 02 Select encodeURIComponent when encoding an individual query parameter value (it escapes /, ?, &, =, :, and #), or select encodeURI when encoding a complete URL whose structural delimiters must remain intact.
- 03 Toggle Treat + as space on when working with HTML form submissions or application/x-www-form-urlencoded query strings where spaces are represented as +.
- 04 Click Swap to move your transformed output back into the input box and flip direction for quick round-trip verification.
- 05 Switch to the URL Query Parser tab and paste any full URL, protocol-less domain, or ?query string to inspect its protocol, host, path, hash, and every decoded key/value pair.
- 06 Use Copy Output or individual row Copy buttons to grab clean values immediately.
How It Works
Practical Examples
Encoding a Query Parameter Value with encodeURIComponent
café & JSON formatter
caf%C3%A9+%26+JSON+formatter
The ampersand (&) is encoded as %26 so it will not split the query string into a second parameter, é becomes UTF-8 %C3%A9, and spaces become + when Treat + as space is enabled.
Encoding a Full URL with encodeURI
https://manytoolshub.com/docs/guía rápida?q=hello world
https://manytoolshub.com/docs/gu%C3%ADa%20r%C3%A1pida?q=hello%20world
With encodeURI (and + as space disabled), protocol colons, slashes, and query delimiters stay intact while non-ASCII characters and spaces are safely encoded.
Parsing a Complex Redirect URL
https://example.com/auth/callback?code=abc123&redirect=https%3A%2F%2Fapp.example.com%2Fhome#done
Protocol: https: | Host: example.com | Path: /auth/callback | Hash: #done | Params: code=abc123, redirect=https://app.example.com/home
The URL Query Parser separates structural parts from nested encoded query parameters so you can inspect OAuth callbacks and UTM links in seconds.
Tips & Best Practices
- Always use encodeURIComponent—never encodeURI—when embedding a URL inside another URL’s query parameter (such as a redirect_uri or callback parameter).
- Avoid double-encoding: if a string already contains %20, encoding it again turns % into %25, producing %2520.
- Remember that + only means space inside query strings (application/x-www-form-urlencoded); inside URL path segments, a literal space must be %20.
- If decoding throws a malformed percent-encoding error, look for an unescaped literal % (like "50% off") that should have been written as %25.
- Because all encoding and parsing runs locally in your browser, you can safely inspect private OAuth tokens, signed S3 URLs, and webhook links without leaking credentials.
Frequently Asked Questions
What is the difference between encodeURIComponent and encodeURI?
encodeURIComponent encodes reserved URL characters like /, ?, &, =, :, and #, which makes it right for individual query parameter values. encodeURI preserves those structural characters so you can encode a full URL without breaking its protocol or path.
When should I enable "Treat + as space"?
Enable it when working with HTML form payloads or query strings (application/x-www-form-urlencoded) where spaces are encoded as +. Disable it when encoding URL paths or RFC 3986 strict strings where spaces must be %20 and + is a literal plus sign.
Why does decoding fail with a malformed percent-encoding error?
A URIError occurs when the input contains a lone % not followed by two hexadecimal digits (such as "100%"), or an incomplete multi-byte UTF-8 sequence (such as %E0%A4%A). Our tool flags the exact sequence so you can fix it.
Does the tool support Unicode accents, CJK characters, and emoji?
Yes. All characters are encoded and decoded as standard UTF-8 byte sequences, handling accented Latin characters, Arabic, CJK scripts, and multi-byte emoji accurately.
Are my URLs or query parameters sent to a server?
No. Everything runs 100% locally in your browser using JavaScript. Sensitive query tokens, API keys, and internal endpoints never leave your device.
Related Tools
Base64 Encoder
Encode and decode UTF-8 text, JWT-ready URL-safe Base64, and files to Data URIs instantly in your browser with live validation and zero server uploads.
CSV ↔ JSON
Convert CSV to JSON and JSON to CSV bidirectionally in your browser with full RFC-4180 quote handling, custom delimiters, header toggles, and instant download.
JSON Formatter
Beautify, validate, sort keys, and minify JSON payloads instantly in your browser with line-by-line error diagnostics and one-click download.
JWT Decoder
Decode JWT headers and payloads; inspect signature segments and expiry dates instantly. Review claims locally in your browser with clear warnings.