Base64 Encoding

Base64 Encoding: Converts binary data into ASCII string format. Commonly used for transmitting data over media designed to handle text.

Text to Encode

0 characters

Examples

Simple Text
Basic text encoding example
Input:
Hello World!
Output:
SGVsbG8gV29ybGQh
JSON Data
JSON object encoding
Input:
{"name": "John", "age": 30, "city": "New York"}
Output:
eyJuYW1lIjogIkpvaG4iLCAiYWdlIjogMzAsICJjaXR5IjogIk5ldyBZb3JrIn0=
Special Characters
Unicode and special characters
Input:
Special chars: äöü ñ @#$%^&*()
Output:
U3BlY2lhbCBjaGFyczogw6TDtsO8IMw4ICBAIyQlXiYqKCk=

Common MIME Types

Documents
text/plain - Plain text
text/html - HTML
application/json - JSON
application/xml - XML
Images
image/jpeg - JPEG images
image/png - PNG images
image/gif - GIF images
image/webp - WebP images
Other
application/pdf - PDF files
application/zip - ZIP archives
audio/mpeg - MP3 audio
video/mp4 - MP4 video

About this tool

Features, specifications, and related tools

Key Features

What makes this tool powerful

  • Text to Base64 encoding and decoding
  • File to Base64 conversion for images and documents
  • Batch processing for multiple files
  • Preview mode with download options
  • Unicode and special character support

Specifications

Technical details and settings

Category
Encoding Tools
Processing
Client Side
Security
Local Only
Difficulty
Beginner

How Base64 Works

Binary to Text Conversion

Base64 converts binary data into a text format using 64 different ASCII characters. This makes it safe to transmit binary data over text-based protocols like email.

Encoding Process

  1. Binary data is split into 6-bit groups
  2. Each 6-bit group maps to one of 64 characters
  3. Characters include A-Z, a-z, 0-9, + and /
  4. Padding with = characters if needed

Example

Text: "Hi"
Binary: 01001000 01101001
6-bit groups: 010010 000110 1001
Padding: 010010 000110 1001 000000
Base64: "SGk="

Common Use Cases

Email Attachments

Encode binary files for safe transmission in email messages.

Data URLs

Embed images and files directly in HTML/CSS using data: URLs.

API Requests

Transmit binary data in JSON API requests and responses.

Configuration Files

Store binary data in text-based configuration files.

Base64 Character Set

A-Z (26 chars)
a-z (26 chars)
0-9 (10 chars)
+ / (2 chars)

Total: 64 characters (6 bits of information per character)

Data URL Format

data:[<mediatype>][;base64],<data>

Format

"Hello" encoded in Base64 with data URL prefix

Example

data:text/plain;base64,SGVsbG8=

Use

Can be used directly in HTML img tags, CSS backgrounds