Base64 Encoder/Decoder

Base64 Encoder & Decoder

Encode text and files to Base64, or decode Base64 back to the original — instantly, right in your browser.

URL-safe Base64 replaces + and / with - and _ and strips padding, so the output is safe to use in URLs and filenames.

0 / 500,000 characters
0 characters
Share

About Base64 Encoder/Decoder

Base64 turns any text or binary file into a safe, plain-text representation made up of letters, digits, and a few symbols. It's commonly used to embed images in CSS or HTML, send binary data in JSON or XML, and pack files into email attachments. This tool encodes and decodes Base64 entirely in your browser, so your data never leaves your device.

Features:

  • Encode or decode text with full UTF-8 support
  • Convert any file to a Base64 string or data URI
  • URL-safe variant for use in links and filenames
  • Instant, live conversion with copy-to-clipboard

How to Use Base64 Encoder/Decoder

  1. Choose Encode or Decode, and Text or File mode
  2. Type, paste, or drop your text or file into the input area
  3. Toggle URL-safe or Data URI if you need those formats
  4. Copy the result with one click

Frequently Asked Questions

What is Base64 encoding?

Base64 is a way of representing binary data (or text) using only 64 printable ASCII characters: A–Z, a–z, 0–9, +, and /. It's designed so binary data can be safely transmitted through text-based systems like email and JSON without corruption.

Is Base64 the same as encryption?

No. Base64 encoding is not encryption — it provides no security or confidentiality. Anyone can decode Base64 text instantly, since it uses a fixed, publicly known alphabet. Use it for data formatting, never for protecting sensitive information.

What is URL-safe Base64?

Standard Base64 uses + and / characters and = padding, which have special meaning in URLs. URL-safe Base64 replaces + with -, / with _, and removes the padding, so the result can be used directly in a URL path or query string.

Is Base64 encryption?

No — this is a common misconception. Base64 is only a data format, not a cipher. It doesn't use a key, and decoding it requires no secret: any Base64 decoder, including this one, converts it straight back to the original data.

Can I encode a whole file, not just text?

Yes. Switch to File mode, drop in a file up to 5 MB, and this tool will convert its raw bytes into a Base64 string or a ready-to-use data URI you can paste directly into HTML or CSS.

Why is my Base64 output longer than the input?

Base64 encodes every 3 bytes of input as 4 characters of output, so encoded data is roughly 33% larger than the original. This overhead is the trade-off for representing arbitrary binary data as plain text.

Privacy

Everything happens locally in your browser using built-in Web APIs. Your text and files are never uploaded to any server.

Standards & References

Last updated: 2026-07-23