Base64 Encoder & Decoder

Encode text to Base64 or decode Base64 back to text. Supports full UTF-8 including emojis and special characters. File to Base64 data URI conversion. 100% browser-based, no data sent to server.

0 characters
0 characters

How to Use

Step-by-Step:

  1. 1
    Select Tab: Choose Encode, Decode, or File to Base64
  2. 2
    Enter Input: Paste text, Base64 string, or upload a file
  3. 3
    Get Result: Click Encode/Decode to see the output
  4. 4
    Copy: Click Copy to Clipboard to use the result in your code

Perfect For:

  • Web Developers: Embed images as data URIs in HTML/CSS
  • API Developers: Encode binary payloads for JSON APIs
  • DevOps Engineers: Encode secrets for K8s configs and CI/CD
  • Email Developers: MIME encoding for attachments

Frequently Asked Questions

What is Base64 encoding?

Base64 is a binary-to-text encoding that represents data using 64 ASCII characters (A-Z, a-z, 0-9, +, /). It makes binary data safe to transmit over text-based protocols like HTTP, email, and JSON.

Does Base64 encrypt my data?

No. Base64 is encoding, not encryption. Anyone can decode it back to original. Use AES or RSA encryption if you need security.

Why is the output larger than input?

Base64 increases size by ~33%. Every 3 bytes of input becomes 4 characters of output. This overhead enables safe text-based transmission.

Does it support Unicode/UTF-8?

Yes. This tool handles full Unicode including emojis, accented characters, and CJK characters using proper UTF-8 encoding.

Is my data safe?

100% safe. All processing happens in your browser. No data is sent to any server. Your text never leaves your device.

What is a Base64 data URI?

A data URI embeds file content in HTML/CSS as data:[mime];base64,[data]. It eliminates separate HTTP requests for small files like icons.

What characters are used in Base64?

Standard Base64 uses A-Z, a-z, 0-9, + and /. The = sign is padding. URL-safe variant uses - and _ instead of + and /.

Can I encode files?

Yes. Use the "File to Base64" tab to upload any file and get a complete data URI ready to embed in HTML or CSS.

Features

Encoding

  • • Text to Base64 encoding
  • • UTF-8 / Unicode support
  • • File to Base64 data URI
  • • Real-time encoding
  • • One-click copy

Decoding

  • • Base64 to text decoding
  • • Input validation
  • • Error messages for invalid input
  • • Handles padding correctly
  • • Download decoded files

Developer Friendly

  • • Monospace code font
  • • Character/byte count
  • • Sample data for testing
  • • No size limits
  • • Works offline

Why Use Our Base64 Tool?

Instant Results

Encode and decode instantly in your browser. No waiting, no server processing.

100% Private

Everything runs locally. No data is sent to any server, ever.

Completely Free

No subscriptions, no limits, no registration required.

Full UTF-8 Support

Handles Unicode, emojis, and all international characters correctly.

File Support

Upload any file and get a complete Base64 data URI for embedding.

Works Everywhere

Responsive design works on desktop, tablet, and mobile browsers.

Common Use Cases

Web Developers

Embed images as data URIs in HTML/CSS, reduce HTTP requests for small assets like icons and logos.

API Developers

Encode binary payloads for JSON APIs, authentication tokens, and webhook signatures.

Email Developers

MIME encoding for email attachments and embedded images in HTML emails.

DevOps Engineers

Encode secrets for Kubernetes configs, environment variables, and CI/CD pipelines.

Data Engineers

Safely transmit binary data through text-based protocols, databases, and message queues.

Security Researchers

Decode suspicious Base64 strings in malware analysis, CTF challenges, and forensics.

Base64 Technical Reference

Base64 Alphabet:

Index 0-25: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Index 26-51: a b c d e f g h i j k l m n o p q r s t u v w x y z

Index 52-61: 0 1 2 3 4 5 6 7 8 9

Index 62-63: + /

Padding: =

How It Works:

  • 1 Input is split into groups of 3 bytes (24 bits)
  • 2 Each 24-bit group splits into four 6-bit values
  • 3 Each 6-bit value (0-63) maps to a Base64 character
  • 4 If input isn't multiple of 3, = padding is added

Size formula: output = ceil(input_bytes / 3) x 4 characters (~33% larger)