URL Encoder/Decoder
Encode/decode URLs.
Loading tool…
What is percent-encoding?
URLs may only contain a restricted set of characters. Anything outside it — spaces, quotes, ampersands, slashes inside a value, Arabic or Chinese text, emoji — must be percent-encoded: each byte is written as a percent sign followed by two hexadecimal digits. A space becomes %20, an ampersand becomes %26, and a non-Latin character becomes several escapes because it is several bytes in UTF-8.
Encoding the wrong characters breaks things just as thoroughly as encoding none. A slash separating path segments must stay a slash, while a slash inside a query value must become %2F. An ampersand separating parameters must stay, while an ampersand inside a value must be escaped or it will split the parameter in two. This is why JavaScript offers two functions — encodeURI for a whole URL and encodeURIComponent for a single value — and why using the wrong one is a common bug.
Why we built this tool
You reach for this while building query strings, debugging an OAuth redirect that keeps failing, reading a callback URL out of a log, or working out what a long tracking link contains.
Those URLs regularly carry session tokens, one-time codes, and email addresses in their parameters — sometimes still valid. Pasting them into a website hands a live credential to a stranger. Ours encodes and decodes in your browser using the built-in URL functions, with no network request, no logging, and no length limit. It answers instantly and keeps working when the connection does not.
Tips and common mistakes
- Encode a whole URL and a single parameter value differently — the rules are not the same.
- A space becomes
%20in a path and may be a plus sign in a query string, depending on the convention in use. - Double-encoding is a common bug: a
%2520in a URL means something was encoded twice. - Non-Latin characters expand to several escapes each, which is correct.
Open URL Encoder/Decoder with a link
URL Encoder/Decoder can be handed its input by the link that opens it, so the page arrives with the work already done. This is meant for assistants and scripts: if a chatbot, an editor extension, or a command-line agent already holds your content, it can build a link instead of asking you to copy and paste into a box.
The payload rides in the fragment — the part of a URL after the #. Browsers never send the fragment to a server, so anything handed over this way stays on your device exactly as a dropped file would. A link that uses the query string instead is rewritten into the fragment by the page before any analytics or ad script can read the address.
Prefix any field with gz — #gztext= — to pass it as gzip-compressed base64url, which fits roughly five to ten times more into the same link. Links stay reliable up to about 8,000 characters; past that, chat apps and address bars start truncating them, and the page says so rather than loading half a document.
One exception to the privacy rule: ?url= tells the page to download the input from an address. That request goes from your browser straight to that server — not through ours — but it does leave your device, and it only works if the server allows cross-origin requests.
#text=— the text to work on
Example: https://mygadgets.ink/tools/url-encoder-decoder/#text=...
Quick start: using URL Encoder/Decoder
- Paste the URL or the value you need to convert.
- Choose encode or decode.
- For encoding, decide whether you are handling a whole URL or a single parameter value.
- Check that structural characters such as slashes and ampersands survived as intended.
- Copy the result into your request, config, or bug report.
To break a link into its parts instead, use URL Parser.