Browser-Based · Instant · Free

Base64 Encoder.
Encode & Decode.

Encode text or files to Base64, or decode Base64 back to original. Everything runs in your browser — nothing is uploaded.

Base64 Encoder / Decoder
0 characters
0 characters
100% Private
All encoding/decoding happens in your browser. Nothing leaves your device.
Instant
Results appear immediately. Handles text and binary files.
File Support
Encode any file to Base64 string — images, PDFs, documents.

How to Encode or Decode Base64

1
Enter your data

Paste plain text to encode it to Base64, or paste a Base64 string to decode it back to plain text.

2
Click Encode or Decode

Choose the appropriate operation. The result appears instantly below.

3
Copy the output

Click Copy to copy the encoded or decoded result to your clipboard.

What Base64 does, in plain terms

Base64 rewrites any data — text, an image, a PDF — using only 64 harmless characters: A–Z, a–z, 0–9, + and /. Every 3 bytes become 4 characters, which is why the result is about one third larger. It exists for places that can carry text but not raw bytes: email bodies, JSON, XML, HTML and CSS.

Examples from this tool

InputBase64
HiSGk=
HelloSGVsbG8=
ZürichWsO8cmljaA==
{"id":7}eyJpZCI6N30=
  • It is not encryption. Anyone can decode Base64 in a second. Never use it to hide passwords or keys.
  • The = at the end is padding. It fills the last group up to four characters and carries no data.
  • Text is treated as UTF-8. Letters such as ü, š or é and emoji encode and decode correctly here. Tools that assume plain ASCII produce a different result or an error for the same text.
  • "Invalid Base64 string" usually means stray characters: line breaks from an email, a missing piece at the end, or the URL-safe variant, which uses - and _ instead of + and /. Replace those two characters and try again.

Encoding a file

  • Encode File reads a file from your device and shows its Base64 text. Nothing is uploaded.
  • To embed a small image directly in HTML or CSS, put data:image/png;base64, in front of the result (use the right type: image/jpeg, image/svg+xml and so on).
  • Keep embedded files small. A 30 KB icon becomes 40 KB of text inside your page and cannot be cached separately. For anything larger than a few kilobytes, a normal image file is the better choice.

Related: the URL encoder makes text safe for links, and the hash generator creates fingerprints that cannot be reversed.

Frequently Asked Questions

Is Base64 encryption?

No. Base64 is encoding, not encryption. Anyone can decode Base64 instantly. Never use it to protect sensitive data.

Why does Base64 make data larger?

Base64 converts every 3 bytes into 4 ASCII characters, resulting in ~33% size increase. This trade-off ensures safe text-based transmission.

What is Base64URL?

Base64URL replaces + with - and / with _ for use in URLs and filenames. It is commonly used in JWT tokens.

Can I encode files or images?

This tool encodes text. To Base64-encode a file, you need to read it as binary data first using programming language libraries.