The URL Encoder/Decoder converts text to and from percent-encoding — the escape format URLs use to safely carry characters like spaces, non-ASCII letters, and reserved symbols. Paste a value to encode it, paste an encoded string to decode it, or paste many lines at once and toggle per-line batch to process each line independently. Three variants cover every real-world case: Component (encodeURIComponent) for single query values and path segments, URI (encodeURI) for whole URLs (preserves :/?#&=), and Form (application/x-www-form-urlencoded) where spaces become +. Decoding auto-handles + vs %20 and gives you a clear line-numbered error when the input has malformed escapes. Everything runs in your browser — nothing is uploaded.
What is URL / percent-encoding and when do you need it?
URLs are ASCII text with a strict grammar. Certain characters are reserved because they have structural meaning — / separates path segments, ? starts the query string, & separates query parameters, # starts a fragment. Other characters are unsafe because they can confuse parsers or intermediaries — spaces, control characters, non-ASCII bytes, quotation marks. Percent-encoding (RFC 3986) is the mechanism URLs use to escape any of those: each unsafe byte becomes % followed by two hex digits. So a space becomes %20, an at sign becomes %40, and the letter é (UTF-8 bytes 0xC3 0xA9) becomes %C3%A9. You'll encounter percent-encoding whenever you build a URL from user input — search queries, filenames, tokens, redirect URLs — and whenever you read one back from a browser address bar, a server log, or an incoming request.
Component vs. URI vs. Form — which variant should you pick?
Three variants cover almost everything. Component uses JavaScript's encodeURIComponent and encodes every character that isn't unreserved (A–Z a–z 0–9 - _ . ~). Use it when you're building a single query value, path segment, or fragment — anywhere the string should not be interpreted as URL structure. URI uses encodeURI and preserves reserved characters (: / ? # & = + , ;) because they still carry meaning inside a full URL. Use it when you have a complete, mostly-valid URL and just want to escape spaces or non-ASCII. Form encodes the same as component but replaces %20 with +, matching the application/x-www-form-urlencoded MIME type that HTML forms and many APIs use. If you're not sure, pick Component — it's the safest default for embedding untrusted values into a URL.
Why + and %20 both mean space (and when they don't)
Inside a query string (the part after ?), historical HTML form conventions treat + as a shorthand for space. Inside a path or fragment, + is a literal plus sign. That's why decoding a URL correctly requires knowing which part you're looking at. This tool's Form variant and the Encode spaces as + option both switch to the plus convention; the decoder handles + automatically in Form mode or when you enable the toggle. If you're decoding a query string parsed from a Content-Type: application/x-www-form-urlencoded request body — that includes almost every HTML form submission — treat + as space. If you're decoding a full URL character by character, be careful: a literal + in a path (like /c++/) is not a space.
UTF-8, non-ASCII characters, and the two-step process
Percent-encoding escapes bytes, not characters. So encoding text that contains anything outside plain ASCII is a two-step process: first the text is turned into bytes (using UTF-8 in modern URLs), then each non-safe byte is written as %HH. The character café is four Unicode codepoints, but nine UTF-8 bytes when encoded: c a f %C3 %A9. Older systems sometimes used Latin-1 or Windows-1252 instead of UTF-8, which is why you occasionally see mojibake — the encoder used one byte scheme and the decoder assumed another. This tool uses UTF-8 throughout (via the browser's built-in encodeURIComponent and decodeURIComponent), so any modern URL round-trips cleanly. If a decode step fails with a URIError, the input is almost always malformed: a lone %, a %X where X isn't hex, or a percent-escape that isn't a valid UTF-8 byte sequence.
Per-line batch mode — encoding lists of URLs or values
Turn on Encode each line separately when you have a list of values — one per line — and want each one processed independently. Without batch mode, the whole textarea is treated as a single string and newline characters themselves get encoded as %0A. With batch mode on, newlines are preserved as separators, and every line is encoded or decoded on its own. That's the shape you want when preparing a CSV column of query values, a list of UTM-tagged URLs, or a batch of filenames to appear in an href. In decode mode, if any line has malformed encoding the tool reports the line number so you can find and fix it quickly rather than losing the whole batch.