TinyTools

Base64 Encoder & Decoder Online

Encode text to Base64 or decode Base64 back to readable text online. Supports UTF-8, Unicode and developer-friendly Base64 conversion directly in your browser.

100% Client-Side Privacy
0 chars 0 bytes (UTF-8)
Valid Input
0 chars 0 bytes

What Is Base64 Encoding?

Base64 is a standardized binary-to-text encoding scheme defined in RFC 4648. It takes raw binary data or 8-bit octet sequences and translates every three bytes (24 bits) into four 6-bit chunks. Each 6-bit chunk maps directly to one of 64 printable characters from the standard ASCII index: uppercase letters A–Z, lowercase letters a–z, digits 0–9, and symbols + and /. When the source byte count is not divisible by three, padding characters (=) are appended to preserve length alignment.

How to Encode Text to Base64

To encode text, each character is converted into its underlying UTF-8 byte representation. The 8-bit binary values are grouped into 24-bit blocks, sliced into 6-bit increments, and mapped to the Base64 alphabet table:

Text Input:
Hello
Base64 Encoded Output:
SGVsbG8=

How to Decode Base64

Base64 decoding reverses the process: each Base64 character is mapped back to its 6-bit numeric value. Four 6-bit numbers are concatenated into a 24-bit binary stream and unpacked into original 8-bit bytes, which are decoded as UTF-8 text or written to a binary file:

Base64 Input:
VGlueVRvb2xz
Decoded Text Output:
TinyTools

Base64 vs Base64URL

In standard Base64, the 62nd and 63rd index characters are + and /. Because both symbols have reserved syntax in URLs and URL query strings, transmitting standard Base64 in HTTP parameters can cause severe parsing errors unless percent-encoded. The Base64URL variant solves this by introducing two safe substitutions:

Is Base64 Encryption?

Base64 is encoding, NOT encryption. Encoding is an open, reversible transformation intended to preserve data integrity across transport protocols. Encryption, by contrast, transforms plaintext into ciphertext using a secret cryptographic key (such as AES or RSA) to prevent unauthorized parties from reading the contents. Never use Base64 alone to obscure passwords, authentication secrets, or sensitive private records.

Common Uses of Base64

API Payloads & Webhooks

Safely embedding binary data, PDF receipts, or cryptographic keys inside REST and GraphQL JSON payloads.

Inline Data URLs

Embedding SVG icons, favicons, or thumbnail images directly into HTML and CSS files using data:image/png;base64,....

Email MIME Attachments

SMTP email systems historically only supported 7-bit ASCII. Base64 encodes binary file attachments into compliant ASCII blocks.

JSON Web Tokens (JWT)

JWT headers, claims, and signatures are encoded with Base64URL to enable seamless transmission inside HTTP Authorization headers.

Binary-to-Text Transport

Storing raw byte sequences, salts, initialization vectors (IVs), and certificate hashes in text-only databases or XML files.

Source Map Assets

Webpack, Vite, and frontend bundlers embed inline JavaScript sourcemaps directly at the bottom of minified code via Base64.

Frequently Asked Questions

Related Developer Utilities