Base64 Encoder & Decoder

Encode text and binary image files into RFC 4648 Base64 strings and Data URIs, or decode Base64 data back to human-readable UTF-8 text with instant live conversion.

UTF-8 Plaintext Input53 chars
Base64 Output

RFC 4648 Base64 Encoding Specifications

Base64 is a binary-to-text encoding scheme defined by IETF RFC 4648. It translates arbitrary binary sequences and multi-byte UTF-8 data into a safe set of 64 ASCII printable characters (A-Z, a-z, 0-9, +, and /) with = padding.

Mathematical 3-to-4 Bit Mapping

Base64 takes every 3 bytes (24 bits) of raw binary data and splits them into four 6-bit groups ($2^6 = 64$). Each 6-bit chunk maps to an index in the 64-character ASCII table, which increases the total character payload size by exactly 33%.

Web & Performance Use Cases (Data URIs)

  • Inline SVG & Icon Embedding: Embedding small icons as Data URIs (data:image/svg+xml;base64,...) directly inside CSS eliminates round-trip HTTP request overhead.
  • API Authentication Tokens: HTTP Basic Authentication encodes username:password credentials in Base64 within the Authorization: Basic <token> request header.
  • Email Attachments (MIME): Email protocols (SMTP) transmit attachments encoded in Base64 lines under RFC 2045.

Developer Utilities Suite

Pair Base64 encoding with our development suite:

Frequently Asked Questions

Is Base64 a form of encryption?

No. Base64 is an open public encoding format, not encryption. It provides zero confidentiality or security and can be decoded instantly by anyone.

Should I embed large images as Base64 strings in HTML?

No. Because Base64 increases byte size by 33% and cannot be cached independently by browser CDNs, inlining large images harms Google Core Web Vitals (LCP). Only inline tiny icons (< 2 KB).