URL Encoder & Decoder
Encode and decode URL-safe text.
Component escapes every reserved character — use it for a single query value or path segment.
How to use URL Encoder & Decoder
What this tool does
URLs may only contain a limited set of characters. Anything outside that set —
spaces, accented letters, emoji, or symbols that have a special meaning in a URL —
must be percent-encoded, replaced by a % followed by two hexadecimal digits.
This tool does that conversion in both directions. Encode turns ordinary text
into a percent-encoded string. Decode turns a percent-encoded string back into
readable text. It uses the browser’s own native encoding functions, so the result
matches exactly what your code and your server will produce, and every conversion
runs locally without sending anything anywhere.
Why you might need it
Any time text travels inside a URL it has to be safe for that context. A search
term with spaces, a redirect target passed as a query parameter, an email address
in a link, a file path with non-Latin characters — all of these need encoding
before they can be placed in a URL without breaking it. Going the other way,
decoding is how you make sense of a URL you have been handed: a log line full of
%20 and %3D, a tracking link, or a query string copied from the address bar.
Encoding also prevents a subtle class of bugs and security issues, where an
unescaped & or # inside a value silently splits the URL and changes its
meaning. Getting the encoding right keeps the structure of the URL under your
control.
How to use it
- Pick Encode or Decode with the Direction toggle.
- Choose a Scope: Component for a single value, or Full URL for a whole address. The one-line hint under the controls explains the difference.
- Type or paste your text into the input box on the left.
- The result appears in the output box on the right, updating as you type.
- Use Copy output to grab the result, or Clear to start fresh.
On a wide screen the input and output sit side by side; on a phone they stack. The character counters above each box show how the length changes — encoding almost always makes text longer, since one reserved character can become three characters or more.
Common pitfalls
The most important choice is Component versus Full URL, and getting it wrong
is the most common mistake. Component mode (encodeURIComponent) escapes the
structural characters : / ? & # = because inside a single value they are just
data. Full URL mode (encodeURI) deliberately leaves those characters alone
because they hold the URL together. If you encode an entire URL with Component
mode you will destroy its structure; if you encode one query value with Full URL
mode, an & inside it will leak out and split your parameters.
Decoding has its own trap: a malformed escape. A lone %, or % followed by
something that is not two hex digits, is invalid and will throw an error rather
than decode. This tool catches that and tells you, so you can find and fix the
broken escape.
One more difference to know: percent-encoding turns a space into %20, but the
older form-encoding format used by HTML forms turns a space into +. They are
not interchangeable — decoding + as a literal plus is correct here.
Tips and advanced use
When building a URL by hand, encode each query value separately in Component mode
and only then join them with & and =. That guarantees the separators stay
separators. To clean up a messy logged URL, decode it in Full URL mode to read it,
then decode individual parameters in Component mode if a value itself contains
encoded characters — double-encoding is real and sometimes you must decode twice.
Because everything runs in your browser, it is safe to encode or decode URLs that contain tokens, internal identifiers, or personal data; none of it is transmitted. The tool also keeps working offline once the page has loaded.
Frequently asked questions
Is anything I paste sent to a server?
What is the difference between Component and Full URL mode?
Why does decoding fail with an error?
Does this tool handle spaces and emoji correctly?
Should I use this for form data with plus signs for spaces?
Related tools
URL Decoder
Decode percent-encoded URLs and query strings.
Base64 Encoder & Decoder
Encode and decode Base64, with full UTF-8 support.
HTML Encoder & Decoder
Encode and decode HTML entities.
URL Parser
Break a URL into its component parts.
UTM Link Builder
Build campaign-tracking UTM links.
Slug Generator
Generate clean, SEO-friendly URL slugs.