Skip to content
Webmaster Tools
Text & encodingBase64 / URL

Base64 & URL Encoder / Decoder

Encode and decode.

Output

      
Runs in your browser

About the Base64 & URL Encoder

This tool handles two encodings. Base64 (RFC 4648) represents bytes with 64 printable characters, used in data URIs, email and HTTP Basic auth. Text is encoded as UTF-8 first, so emoji round-trip correctly. The URL-safe option uses the base64url alphabet (- and _ instead of + and /) and drops = padding, as JWTs do. When decoding, whitespace is ignored, missing padding is added, and both alphabets are accepted. If the decoded bytes aren't valid UTF-8, they are shown as hex with a warning.

URL mode applies percent-encoding. Component uses encodeURIComponent, escaping / ? & = too, for a single query value. Full URL uses encodeURI, which keeps the URL's structure. Decoding treats + as a space. Everything runs in your browser.

How to use it

  1. Choose Base64 or URL, then Encode or Decode.
  2. Type or paste your input; the output updates as you type.
  3. Copy the result, or click Use output as input to reverse it.

Examples

Common questions

Is Base64 encryption?

No. It is a reversible encoding with no key; anyone can decode it. Don't use it to hide secrets.

Why is Base64 output longer than the input?

Every 3 bytes become 4 characters, so encoded data is about 33% larger; = pads the last group to 4 characters.

Why do I get "Invalid Base64 input"?

The text has characters outside the Base64 alphabets, or an impossible length, often from a truncated copy.

Component or Full URL?

Use Component for a single query value or path segment. Use Full URL for a complete address whose ? and & must stay intact.