Base64 Encoder & Decoder

Encode text or files to Base64, or decode Base64 strings back to text. All processing happens locally in your browser.

0 characters

Encoded Base64 will appear here...

What is Base64 Encoding?

Base64 is a binary-to-text encoding scheme that converts binary data into ASCII text format. It's commonly used to encode images, files, and binary data for transmission over text-based protocols like email, JSON APIs, and HTML/CSS.

Our Base64 encoder/decoder runs entirely in your browser using JavaScript's built-in btoa() and atob() functions. Your data never leaves your device - no server uploads, no tracking, completely private.

Features

Text Encoding

Convert plain text to Base64 format instantly using browser-native APIs.

Text Decoding

Decode Base64 strings back to readable text with error detection.

File Upload

Upload images, PDFs, or any file to encode them to Base64 data URLs locally.

100% Private

All encoding/decoding happens in your browser. Files are read locally via FileReader API.

Common Use Cases

  • Embed images directly in HTML/CSS using data URLs
  • Encode API credentials or tokens for HTTP headers
  • Convert binary files to text for JSON APIs
  • Decode Base64-encoded email attachments
  • Debug Base64 strings in configuration files
  • Prepare files for embedding in source code

How to Use

Encoding Text:

  1. Select "Encode" mode
  2. Paste your text in the input area
  3. Click "Encode"
  4. Copy the Base64 output

Encoding Files:

  1. Select "Encode" mode
  2. Click "Upload File" and choose any file
  3. The file is read locally and converted to Base64 automatically
  4. Copy the Base64 output to use in your code

Decoding:

  1. Select "Decode" mode
  2. Paste the Base64 string in the input area
  3. Click "Decode"
  4. View the decoded text in the output area

Privacy & Security

This Base64 encoder/decoder is completely client-side. When you upload a file:

  • The file is read using the browser's FileReader API
  • Conversion happens in your browser's memory
  • No network requests are made
  • The file never leaves your device

Verify yourself: Open Developer Tools (F12) → Network tab, then upload a file. You'll see zero outbound requests containing your data.