URL Encoder / Decoder
A URL encoder / decoder converts text into the percent-encoded form a URL requires, and turns those %XX sequences back into readable characters. Browsers, servers, and analytics platforms only accept a limited set of characters in a URL, so a space becomes %20 and an ampersand becomes %26; getting that escaping right is what keeps tracking parameters, redirects, and canonical tags from silently breaking.
This free, browser-based tool runs the real encodeURIComponent, encodeURI, and decodeURIComponent functions on whatever you paste, with a component-versus-full-URL choice and an optional per-line mode. Everything is computed locally, so nothing you paste is sent anywhere.
🔒 Private: everything runs in your browser. Nothing you paste is uploaded.
How to use the URL encoder and decoder
Pick a tab, paste your text, and the result updates on every keystroke. Encode mode lets you choose how aggressively to escape; decode mode flags any malformed percent sequence instead of failing silently.
Choose component encoding for values, full-URL encoding for whole links
The component scope runs encodeURIComponent, which escapes the reserved characters that carry meaning inside a URL — the ampersand, equals sign, question mark, slash, and hash. Use it for a single piece such as a query value, a redirect target, or a slug, so a value like aged domains & expired cannot split your parameters. The full-URL scope runs encodeURI, which leaves those structural characters intact and only escapes spaces and genuinely unsafe characters, which is what you want when encoding an already-assembled link.
Decode safely, with malformed sequences caught for you
Decoding reverses the process: %20 becomes a space, %26 becomes an ampersand, and a fully escaped link becomes readable again. The catch is that a stray percent sign or a truncated sequence like %2 is not valid, and the underlying decoder throws an error on it. This tool wraps the decode step in error handling and shows a clear red pill pointing at the problem, so a copy-paste accident produces a helpful message rather than a broken string or a thrown exception.
Process a list line by line for bulk parameters
Switch on per-line processing to treat each line of the input as its own value. Paste a column of UTM parameters, redirect sources, or hreflang query strings exported from a spreadsheet, and each line is encoded or decoded independently rather than as one blob, so newlines stay as newlines in the output. The before-and-after character counts update for the whole batch, which makes it easy to confirm that a long list of tracking values was transformed end to end before you paste it into a tag manager or a redirect map.
URL encoding frequently asked questions
Q1What is the difference between encodeURIComponent and encodeURI?
encodeURIComponent escapes the reserved characters that structure a URL, including the ampersand, equals, question mark, slash, and hash, so it is the right choice for a single query value or path segment. encodeURI leaves those structural characters alone and only escapes spaces and unsafe characters, which suits an already-complete URL. The component tab uses the first; the full-URL tab uses the second.
Q2Why does a space turn into %20 in a URL?
URLs are limited to a small set of safe ASCII characters, and a literal space is not one of them. Percent-encoding replaces it with %20, the hexadecimal code for a space, so the URL survives being copied, logged, and parsed without being cut short. Some encoders use a plus sign for spaces inside query strings, but %20 is the universally safe form this tool produces.
Q3Why am I seeing a malformed input error when decoding?
Decoding fails when the text contains a percent sign that is not followed by two valid hexadecimal digits, such as a lone percent character or a truncated %2 sequence. That usually means the string was already partly decoded, was copied incompletely, or contained a literal percent that itself needed escaping. The error pill names the line so you can find and fix the stray character.
Q4Is it safe to paste private or unpublished URLs into this tool?
Yes. The encoding and decoding run entirely in your browser with client-side JavaScript, and nothing you paste is uploaded, logged, or stored anywhere. The tool keeps working even with the network disconnected once the page has loaded, which makes it safe to use for staging links, internal redirects, and parameters you do not want leaving your machine.
Q5Should I encode a URL once or multiple times?
Encode each value exactly once for the context it sits in. Double-encoding turns a percent sign into %25 and produces strings like %2520 that break when a server decodes only one layer. If you need to nest an encoded URL inside another parameter, encode the inner value as a component first, then encode the assembled URL, and decode in the reverse order.
