URL encoder and decoder
Percent-encoding both ways, worked out as you type.
Output
Paste or type above to see the result here.
Your files stay on your device
This tool runs entirely in your browser. What you paste is processed on your device and is never sent to a server, so it is safe to use with tokens, keys and unpublished text.
How it works
- Paste the text or the URL. The result appears as you type.
- Choose Encode or Decode.
- Tick “Treat it as a whole URL” when the text is a complete address, so the characters that give it its structure survive. Leave it off for a single value going into a query string — that is the case where they must not.
- Copy the result.
Frequently asked questions
- What is the difference between the two modes?
- Encoding a whole URL keeps the characters that make it a URL — : / ? # & = — so https://example.com/a b becomes https://example.com/a%20b. Encoding a value does not: a search term or a redirect URL going inside ?q= must have its own & and = encoded, or it ends the parameter early and quietly breaks the link. When in doubt about a single parameter, leave the box unticked.
- Is my URL sent anywhere?
- No. It is converted in this page. Links carry session tokens, signed URLs and internal hostnames often enough that this is worth saying.
- Why did decoding fail?
- Because a % in the text is not followed by two hexadecimal digits, which is what percent-encoding means. Text containing a literal per-cent sign — “50% off” — is not encoded text, and decoding it is not defined. Encode it first if that is what you need.
- Does it handle accents and non-Latin text?
- Yes. Characters are encoded as UTF-8 bytes, which is what browsers and servers expect: é becomes %C3%A9 and 日本語 becomes %E6%97%A5%E6%9C%AC%E8%AA%9E. Decoding takes them back.
- What about spaces becoming + signs?
- That is a different convention, used in old HTML form submissions, where a space is written as + rather than %20. Both are accepted by servers in a query string; this tool writes %20, which is correct everywhere including in a path.
Related tools
∿ Base64 Convert text to Base64 and back, with correct UTF-8 handling and an optional URL-safe alphabet. {} JSON Formatter Paste JSON, get it indented, minified or validated instantly. Your data stays on this page. # Hash Generator Get the MD5, SHA-1 or SHA-2 digest of any text, computed on your device. ♭ JWT Decoder Paste a JSON Web Token and read its header and claims. The token never leaves your browser.