URL Encoder/Decoder

URLs can only contain a limited set of characters, so everything else — spaces, &, non-English text, emoji — must be percent-encoded (%20, %26, …) before it goes into a link or query string. This free URL encoder/decoder converts in both directions, live as you type, with correct UTF-8 handling and warnings for the two classic mistakes: double encoding and encoding an entire URL. Everything runs 100% in your browser.

100% client-side — your data never leaves this browser.

What URL encoding is

Percent-encoding replaces each unsafe byte with % plus two hex digits. The characters you'll meet most:

CharacterEncodedWhy it's encoded
space%20Not allowed raw in URLs
&%26Separates query parameters
?%3FStarts the query string
=%3DSeparates parameter names from values
#%23Starts the fragment
%%25The escape character itself
é / 👋%C3%A9 / %F0%9F%91%8BUTF-8 bytes, each percent-encoded

Characters that never need encoding: letters, digits, and - _ . ~. Everything else in a value should be encoded.

Decoding is the mirror image: each %XX sequence is converted back to its byte, and the bytes are read as UTF-8. A lone % or a truncated sequence like %2 is malformed — strict decoders reject it rather than guess, which is why this tool shows an error instead of silently mangling your input.

Common use cases

  • Search and filter URLs — user input with spaces and symbols goes into query strings safely.
  • Redirect targets — a ?next=/page?q=a b parameter must be encoded or the inner URL breaks the outer one.
  • Pre-filled share links — "share on X" URLs carry the page title and URL as encoded parameters.
  • API calls — path segments and query values containing special characters.
  • Debugging — decode a mangled URL to see what the server actually received.

How to use it

  1. Choose Encode or Decode.
  2. Type or paste — conversion is live, with a count of encoded/decoded sequences.
  3. Heed the warnings: already-encoded input and full URLs get flagged.
  4. Copy the output.

+ vs %20

This is the most common encoding confusion on the web. When an HTML form is submitted, spaces in the values become + — that's the application/x-www-form-urlencoded format, and it applies only to form-style query strings. In every other part of a URL (paths, fragments), a space is %20 and a literal + means a plus sign. Most server frameworks decode + as space in query strings but not in paths, which is exactly where subtle bugs come from. When in doubt, %20 is the safer, more universal choice.

Encode data — not entire URL structure

Two rules prevent nearly all URL-encoding bugs. First: encode values, never whole URLs. The characters : / ? & = are the URL's grammar — encoding them turns a working link into a dead string. Encode each query value on its own, then join them with & and = yourself. Second: encode exactly once. Encoding is not idempotent: running it twice turns %20 into %2520, and the server decodes only one layer, leaving garbage. If a value arrives with literal %20 text in it, something upstream double-encoded — decode once and fix the source, don't encode a third time.

Frequently asked questions

What is URL encoding?
URLs may only contain a limited character set, so anything outside it — spaces, non-English text, emoji, and reserved characters like & and ? — is rewritten as a % followed by two hex digits (the character's UTF-8 bytes). "hello world" becomes "hello%20world". It's also called percent-encoding.
When do I need to encode a URL?
Whenever a value you put into a URL contains characters outside the safe set: search queries, form data in query strings, filenames in download links, and redirect targets. If your links break or servers misread parameters whenever the text contains spaces or symbols, missing encoding is the usual cause.
What's the difference between + and %20?
In query strings submitted by HTML forms (application/x-www-form-urlencoded), a space becomes +. Everywhere else in a URL, a space is %20. Most servers accept both in query strings, but in paths only %20 is correct — a literal + in a path means a plus sign, not a space.
What is double encoding and why is it bad?
Double encoding means encoding an already-encoded string: %20 becomes %2520 (the % itself gets encoded to %25). The server then decodes once and ends up with the literal text "%20" instead of a space. This tool warns you when your input looks already-encoded, so you can catch it before it ships.
Should I encode the entire URL?
No — encode the data, not the structure. Encoding a full URL turns https:// into https%3A%2F%2F, destroying the scheme, slashes, and separators the browser needs. Encode each query parameter value (and path segment, if it contains special characters) individually, then assemble the URL.
Does this handle Unicode and emoji correctly?
Yes. Characters are converted to UTF-8 first, then each byte is percent-encoded — so é becomes %C3%A9 and 👋 becomes %F0%9F%91%8B. That matches what browsers and servers expect; older tools that encoded UTF-16 code units instead produced mojibake.
Is my data uploaded anywhere?
No. Encoding and decoding run entirely in your browser with the built-in encodeURIComponent/decodeURIComponent functions. Nothing is sent to any server.