Like ToolFern? Prefer us as your source on Google →

URL Encode & Decode

Turn text into a URL-safe percent-encoded string and back again, UTF-8 safe and free.

What is URL encoding?

URLs are only allowed to contain a limited set of characters. Spaces, ampersands, question marks, slashes and any non-ASCII letters can change how a link is parsed, or break it entirely. URL encoding (also called percent-encoding) replaces each unsafe character with a % followed by its hex byte value, so hello world becomes hello%20world and café becomes caf%C3%A9. Decoding reverses the process to recover the original text.

How to use it

  1. Pick a mode: Component for a single query value or path segment, Full URL for a complete URL. See the difference below.
  2. Encode: paste your text into the input and press Encode →.
  3. Decode: paste a percent-encoded string into the input and press Decode ← to read it back.
  4. Batch mode: tick the checkbox to treat each line of the input as its own value, so a whole list converts in one click instead of one at a time.
  5. Copy the result with one click and drop it straight into your URL, API request or config file.

Component mode vs. Full URL mode

This is the part people get tripped up on most, so here it is plainly. The tool has two modes, and they escape different sets of characters.

Component mode uses the browser's standard encodeURIComponent and decodeURIComponent. It escapes everything that isn't safe inside a single URL component, meaning one query-string value or one path segment, including characters a URL uses as delimiters between its own parts: / ? & = : @ ; , + $ # and, of course, spaces. Use this mode when the text you're encoding is going to be dropped into a bigger URL as a value. If that value itself contains an & or a =, you want it escaped, otherwise it would get read as a second query parameter instead of part of your value.

Full URL mode uses encodeURI and decodeURI instead. It assumes the input is already a complete, well-formed URL, so it leaves those same structural characters alone (/ ? & = : @ ; , + $ #pass through untouched) and only escapes what can never legally appear in a URL at all, like spaces and non-ASCII letters. Use this mode when you're encoding or decoding an entire address, not a single value, so the slashes and query string stay intact.

A quick example makes it concrete. Encoding a b&c=d in Component mode givesa%20b%26c%3Dd, every unsafe character escaped. Encoding the full addresshttps://example.com/search?q=a b in Full URL mode giveshttps://example.com/search?q=a%20b, the slashes, the question mark and the equals sign are left exactly where they were, only the space inside the query value gets escaped.

When you need it

Anyone working with the web hits URL encoding constantly: building query strings by hand, debugging an API call that returns the wrong result, sharing a search link with special characters, or storing a redirect target inside another URL. Encoding makes the value travel safely; decoding lets you read a captured URL that's full of %20 and %2F noise. Batch mode is there for when you've got a list of values or URLs to convert at once, log lines, a spreadsheet column, a set of redirect targets, instead of running them through one at a time.

Frequently asked questions

What is the difference between Component and Full URL mode?

Component mode (encodeURIComponent/decodeURIComponent) escapes every character that isn't safe inside a single URL value, including delimiter characters like / ? & = : @. Full URL mode (encodeURI/decodeURI) assumes the input is already a whole URL and leaves those delimiter characters alone, only escaping things like spaces and non-ASCII characters.

Does it support Unicode and emoji?

Yes, percent-encoding is UTF-8 based, so accents, emoji and other non-ASCII characters round-trip correctly.

Why did decoding show an error?

Decoding fails if the input contains a malformed percent sequence, like a lone % or %ZZ. Check that every % is followed by two valid hex digits. In batch mode, only the affected line shows an error, the rest still decode.

What does batch mode do?

Turn on the batch checkbox and each line of the input is encoded or decoded on its own, so you can convert a whole list of values or URLs in one click instead of one at a time.

Is this the same as Base64?

No. URL encoding only escapes unsafe characters and stays mostly readable; Base64 rewrites data into a 64-character alphabet. For Base64, use our separate Base64 tool.

Found this useful? Share it