What this URL encoder and decoder does
This tool converts text to and from percent-encoded format, the way browsers and servers expect URLs to be written. Switch it to Encode and a space turns into %20, an ampersand into %26, a question mark into %3F. Switch it to Decode and those codes turn back into the plain characters you can read. It is handy for developers building API requests, marketers pasting tracking links, and anyone who has copied a messy URL full of %2F and wants to see what it really says.
Under the hood it runs the same encodeURIComponent and decodeURIComponent functions your browser uses, so the output matches what real code produces.
How to use it
- Paste or type your text into the input box.
- Open the Mode dropdown and choose Encode to escape characters, or Decode to turn escape codes back into text.
- Read the result in the output box below, shown in a monospace font so every character is easy to check.
- Click copy to grab the result and drop it straight into your code, browser bar, or link.
Switching the Mode dropdown reprocesses your text right away, so you can flip back and forth to compare both directions.
Why use it here
It is quick and it stays on your machine. Nothing you type gets uploaded, because the encoding happens locally in your browser, which matters when a query string holds tokens, IDs, or anything you would rather not send to a stranger’s server. It is free, needs no sign-up, and loads instantly on phone or desktop.
Because it uses encodeURIComponent, it escapes /, ?, &, and = as well, which is exactly what you want for a single query value or path piece, and worth knowing if you are encoding a whole link.
Tip: encode each query value on its own before joining them with &, so the separators stay readable while the values stay safe.
Frequently asked questions
- What does URL encoding actually do?
- It replaces characters that are unsafe in a URL with a percent sign and two hex digits. A space becomes %20, an ampersand becomes %26, and so on. This keeps query strings and links from breaking when special characters are involved.
- What is the difference between encode and decode mode?
- Encode turns plain text into percent-encoded form (for example, hello world becomes hello%20world). Decode does the reverse, turning %20 and other escape codes back into readable characters. Use the Mode dropdown to switch between the two.
- Does this encode the whole URL or just one part?
- It uses encodeURIComponent, which escapes characters like /, ?, &, and = too. That makes it ideal for encoding a single query value or path segment, not a full URL where those characters need to stay intact.
- Why does decoding sometimes show an error?
- Decoding fails when the input has a malformed escape sequence, such as a lone % that is not followed by two valid hex digits. Check that every % in your text is part of a complete code like %20, then try again.
Related converters
Last updated: June 15, 2026