Home / Development / Base64 Encode/Decode

Base64 Encode/Decode

Encode text strings to Base64 or decode Base64 back into readable UTF-8 text.

Interactive Online Utility

Base64 Encode/Decode runs 100% locally in your browser sandbox with zero network roundtrips. Load or paste your code directly into the workspace above to format, parse, validate, or generate your output instantly.

The ultimate high-performance developer toolbox!
DID YOU KNOW? Predictable 33% Payload Expansion

Base64 represents binary data using 6 bits per character. 3 input bytes (24 bits) produce 4 output ASCII characters (32 bits), guaranteeing an exact 33.3% size overhead compared to raw binary.

Technical Guide & Overview

Base64 (RFC 4648) is a binary-to-text encoding scheme that translates raw 8-bit octets into a 64-character ASCII radix (A–Z, a–z, 0–9, +, and /). It is ubiquitously deployed across MIME email headers, Basic HTTP Authentication, data URLs for images/fonts, and secure cryptographic token wrappers.

How It Works Under the Hood

Base64 splits input bytes into 6-bit chunks (since 2^6 = 64). Three 8-bit bytes (24 bits total) are converted into four 6-bit Base64 indices. If the input payload length is not divisible by 3, equal sign padding characters (=) are appended to preserve 4-character alignment.

Authoritative Specifications & Primary Standards

Official specifications, RFCs, and authoritative open-source repositories for Base64 Encode/Decode:

IETF RFC

Official internet standard defining radix 64 encoding alphabet and padding conventions.

GitHub Repository

Authoritative C cryptography library powering terminal base64 commands.

CLI Equivalents & Terminal Automation

Encode string on Linux/macOS:
echo -n "Hello Otuls" | base64
Encodes text without trailing newline using GNU or BSD base64 utility.
Decode Base64 payload:
echo "SGVsbG8gT3R1bHM=" | base64 --decode
Restores the original plaintext or binary byte stream.
Encode with OpenSSL:
openssl base64 -in secret.key -out secret.b64
Standard security-grade file encoder.

Zero-Knowledge Client-Side Sandboxing

All encoding and decoding operates client-side with native Web APIs (TextEncoder, TextDecoder, Uint8Array). API keys, passwords, and private certificates never leave your device.

Frequently Asked Questions

Q: What is Base64 encoding?

Base64 is a binary-to-text encoding scheme that represents binary data in an ASCII string format. It is commonly used when binary data needs to be stored or transferred over media designed to handle text.