URL Encoder & Decoder
Percent-encode or decode URLs and query strings — handles spaces, symbols, and special characters correctly.
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.
- Leave "Encode/decode as URL component" checked for a single query value (the default), or uncheck it if you're processing a complete URL.
- 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.
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.