URL Encoder & Decoder
This URL encoder percent-encodes a value for safe use in a link, decodes one you have been handed, or takes a whole URL apart — protocol, host, path, hash and every query parameter, all editable and rebuildable.
How to use URL Encoder & Decoder
- Paste the text or URL you want to convert into the input box.
- Pick encodeURIComponent for a single value, or encodeURI when you are encoding a complete URL.
- Switch to Decode to reverse either operation and reveal the original characters.
- Open the URL Inspector tab, paste a full URL, and read the parsed breakdown of every component.
- Edit, add or remove query parameters in the table, then copy the rebuilt URL.
About URL Encoder & Decoder
A URL has a grammar, and percent-encoding is what keeps text from breaking it. When a value contains a character that means something structural — an ampersand that would start a new parameter, a hash that would begin a fragment, a space that some proxies will silently truncate at — that character has to be replaced by a percent sign and its hexadecimal byte value. Non-ASCII text is converted to UTF-8 first, which is why a single accented letter can expand into two escape sequences.
The mistake that costs the most debugging time is reaching for the wrong function. encodeURIComponent is for the pieces; encodeURI is for the whole. Encode a complete URL with the component version and your https:// becomes https%3A%2F%2F; encode a single search term with encodeURI and any ampersand inside it will silently split into a new parameter — a small bug with a long tail, because it only fires on the inputs that happen to contain one.
The query-string inspector exists for the other half of the job: understanding a URL somebody has handed you. Paste an OAuth callback, a tracking-laden campaign link or a long API request and the tool splits out protocol, host, port, path, fragment and each parameter as an editable row, decoding values as it goes. Change one, delete the three UTM parameters you do not want, and copy the rebuilt URL — which is assembled with the native URL and URLSearchParams APIs so the escaping stays correct.
Frequently asked questions
What is the difference between encodeURI and encodeURIComponent?
encodeURIComponent escapes almost everything that is not alphanumeric, including /, ?, & and = — use it for a single query value or path segment. encodeURI deliberately leaves those reserved characters alone so a complete URL stays functional. Encoding a whole URL with the component version breaks it.
Why does a space sometimes become %20 and sometimes +?
Percent-encoding as defined for URIs uses %20. The + form comes from the older HTML form encoding, application/x-www-form-urlencoded, and is only valid inside a query string. Decoders that treat + as a space in a path are wrong; this tool shows both interpretations where it matters.
Is my URL sent anywhere?
No. Encoding, decoding and parsing all run locally in your browser using the native URL API. URLs frequently contain session tokens and personal identifiers, so keeping them off the network is the point.
What characters actually need encoding?
Anything outside the unreserved set — A–Z, a–z, 0–9 and - _ . ~ — should be encoded inside a value. In practice the ones that cause real bugs are spaces, &, =, #, +, ? and any non-ASCII character, which is first converted to UTF-8 bytes and then percent-escaped byte by byte.
Can it decode a double-encoded URL?
Yes — run Decode twice. Double encoding shows up as %2520 (a percent sign that was itself encoded) and is a classic cause of broken redirect and callback URLs, so it is worth checking whenever a link looks almost right.
Related tools
- Base64 Encoder & Decoder — Text and files to Base64, both ways
- JWT Decoder — Decode and verify JSON Web Tokens
- JSON Formatter — Beautify, validate & minify JSON
- Regex Tester — Test regular expressions live
- Diff Checker — Compare two texts line by line
- Hash Generator — MD5, SHA, CRC32 & HMAC checksums