URL Encoder & Decoder
Percent-encode or decode URLs and query strings — handles spaces, symbols, and unicode correctly, with batch input and a live character-by-character preview.
How to Encode or Decode a URL
- Choose "Encode" or "Decode" with the pill toggle at the top of the tool.
- Paste the text or URL you want to process into the input box — or check "Batch mode" first to process a list, one item per line.
- Leave "Encode/decode as URL component" checked for a single query value (the default), or uncheck it if you're processing a complete URL. Check "Use + for spaces" if you're working with form-encoded (application/x-www-form-urlencoded) data.
- Watch the Live Preview update as you type — it highlights exactly which characters change and why.
- Click the action button, then copy the result with "Copy Result".
Frequently Asked Questions
What's the difference between the "URL component" checkbox being on or off?
When checked, the tool uses encodeURIComponent/decodeURIComponent, which escapes nearly every special character — the right choice for a single query value like a search term. When unchecked, it uses encodeURI/decodeURI, which leaves characters like :, /, ?, and & untouched because they're structurally meaningful in a full URL.
Why would encoding a whole URL with the component checkbox on break it?
encodeURIComponent escapes "/" and "?" along with everything else, so running a complete URL like https://example.com/path?q=1 through it would mangle the scheme and path. Uncheck the box first if you're encoding a full URL rather than a single value.
What does encoding do to a space character?
It converts the space to its percent-encoded form, %20, following standard percent-encoding rules; other special characters like &, =, and # are similarly converted to their %XX hex equivalents.
Why did decoding fail with an error?
decodeURIComponent and decodeURI throw an error on malformed percent sequences, such as a stray "%" not followed by two valid hex digits. The tool catches that and tells you the input may contain invalid encoding. In batch mode, only the specific line with the problem is marked as invalid in the result — the rest of the batch still processes normally.
What does batch mode do?
When "Batch mode" is checked, the tool treats each line of the input as a separate item and encodes or decodes them independently, joining the results back together one per line — useful for processing a list of URLs or query values at once. If one line contains invalid encoding, only that line is marked as unable to process; the rest of the batch still completes.
What's the difference between %20 and + for encoding spaces?
%20 is the standard percent-encoding for a space and is what encodeURIComponent and encodeURI produce. The + character is a separate, older convention used specifically by the application/x-www-form-urlencoded format (classic HTML form submissions and query strings built that way) to represent a space. Checking "Use + for spaces" makes the tool convert between + and a literal space instead of %20, matching that form-encoded convention.
What does the highlighting in the Live Preview show?
The Live Preview updates as you type and highlights, character by character, exactly which parts of your input will change. In Encode mode it highlights characters that aren't safe to leave as-is and shows what they become; in Decode mode it highlights each %XX sequence (and + if that option is checked) and shows what it decodes to, so you can see exactly why the output looks the way it does before running the conversion.
Does this tool send my URL to a server to process it?
No — encoding and decoding are done entirely with the browser's built-in encodeURIComponent, decodeURIComponent, encodeURI, and decodeURI functions, running locally on your device.