Component mode escapes every reserved character (&, =, ?, /, space). Use it for a single query value or path segment.
URL encode and decode, privately in your browser
This free URL encoder and decoder percent-encodes text for safe use in links and query strings, and decodes encoded URLs back to readable text. It offers both component-level encoding for single values and full-URL encoding that preserves a URL's structure. Everything runs locally, so URLs containing tokens or personal data never leave your device.
No signup, no limits, no ads. Choose a mode, paste your input, and copy the result.
How to use it
- Pick encode or decode. Encode makes text URL-safe; decode turns a percent-encoded string back into readable text.
- Choose component or full URL. Component for a single query value or path part; full URL to encode an entire address.
- Paste your input and read the output pane.
- Copy the result or feed it back in to verify the round-trip.
Common use cases
- Building query strings. Safely encode a search term, filter, or email address into a URL parameter.
- Reading encoded links. Decode a long tracking or redirect URL to see where it actually points.
- OAuth and redirects. Encode a redirect_uri or state parameter so it survives being nested inside another URL.
- Debugging routing. Check whether a special character in a path is being encoded the way your server expects.
- Sharing links. Encode a URL with spaces or unicode so chat apps and emails do not mangle it.
Why URLs need encoding
A URL has a strict grammar. Characters like ?, &, #, /, and the space each carry meaning, so when a value you want to include happens to contain them, the URL can break or be misread. Percent-encoding replaces each unsafe byte with a % followed by its hex code, so the value travels as inert data and is reassembled exactly on the other side. Component mode is the safe default for individual values; full-URL mode is for encoding an entire address while keeping it functional.
Frequently asked questions
- Does my input leave my browser?
- No. Encoding and decoding run locally in JavaScript. Nothing you paste is sent anywhere, so URLs that contain tokens, session ids, or personal data stay on your device.
- What is the difference between component and full URL mode?
- Component mode uses encodeURIComponent, which escapes every reserved character including & = ? / and spaces. Use it for a single query parameter value or path segment. Full URL mode uses encodeURI, which leaves the characters that give a URL its structure (: / ? # & =) intact, so you can encode a whole URL without breaking it.
- Why do spaces become %20 (or sometimes +)?
- Percent-encoding represents a space as %20. The plus sign is an older convention specific to form submissions (application/x-www-form-urlencoded). This tool uses the standard %20, which is correct in URLs and accepted everywhere.
- When do I actually need to encode a URL?
- Any time you put user input, a search query, an email address, or a redirect target into a URL. Unencoded special characters can truncate the URL, break routing, or be interpreted as separators. Encoding makes the value safe to transport.
- Why does decoding fail with a malformed sequence error?
- A percent sign must be followed by two hex digits (for example %2F). If the input has a lone % or an invalid pair, the decoder cannot interpret it and reports the error rather than guessing.
- Does it handle non-English characters?
- Yes. Characters such as accents, Arabic, and CJK are encoded as their UTF-8 byte sequences in percent form, and decoded back to the original text. The round-trip is lossless.
Other tools you might like
- Base64 Encoder , encode and decode text and data as Base64.
- JSON Formatter , beautify, validate, and minify JSON.