Encoding
Source text
Base64 result

Base64 Encode & Decode

A fast and secure tool to encode text into Base64 format and decode Base64 back to plain text.

Supports multiple character encodings: UTF-8, Windows-1251, KOI8-R, IBM866, ISO-8859-5, Windows-1252, ASCII, UTF-16.

How Base64 works

The principle of transforming binary data into transmission-safe ASCII text.

1. Split into bytes

Every 3 bytes of raw input data (24 bits) are combined into a continuous bit stream.

2. Divide into 6-bit groups

The 24-bit stream is partitioned into 4 groups of 6 bits each. A 6-bit number ranges from 0 to 63.

3. Character substitution

Each 6-bit index is mapped to a character from the Base64 alphabet (A-Z, a-z, 0-9, +, /). Padding = is appended if bytes are missing.

Encoding example: 'Cat' in UTF-8

The 3 letters 'Cat' correspond to bytes 43, 61, 74 (24 bits total). Split into four 6-bit groups, they produce the Base64 string: Q2F0.

About the tool

A practical utility for web development, data transmission, and debugging.

01

Web Development & APIs

Transmit binary payloads, inline images as data URIs, and construct HTTP Basic Auth headers.

02

Network Protocols

Encode attachments and headers for email formats (MIME) and messaging protocols.

03

Debugging & Security

Quickly inspect token payloads, webhooks, and serialized data structures.