Base64 Encoder, Decoder & Image Converter

Encode text or binary into Base64 format, decode Base64 back into plain UTF-8 text, or convert images into inline Base64 Data URIs. Supports RFC 4648 URL-safe mode. 100% client-side.
Plain Text
Ready 0 bytes
Base64 Output
No output 0 bytes (+0%)

Verify You're Human

A Plain-English Guide to Base64 Encoding & Data URIs

Base64 is a binary-to-text encoding scheme defined by RFC 4648 designed to transport arbitrary binary data (such as compiled bytes, cryptographic keys, and raster images) across text-only protocols like HTTP headers, JSON payloads, and MIME emails without data corruption.

How Base64 Encoding Works Under the Hood

Digital text and binary files are stored in 8-bit octets (bytes), allowing $2^8 = 256$ possible values per byte. Many of these values represent non-printable control characters (such as null bytes, line feeds, and bell alerts) which legacy network protocols could alter or drop.

Base64 solves this by taking groups of 3 bytes (24 bits) and dividing them into 4 sextets (6 bits each). Since $2^6 = 64$, each 6-bit chunk maps perfectly to an index within an ASCII-safe 64-character alphabet:

Why Base64 Increases File Size by ~33%

Because 3 original bytes become 4 encoded ASCII characters, Base64 encoding inherently increases data footprint by exactly $4/3 \approx 133.33\%$. When encoding an image into an inline CSS background or HTML Data URI, expect the file payload to grow by approximately one-third.

Standard vs URL-Safe Base64

Standard Base64 contains the characters + and /. In URLs, + is frequently interpreted as a space, and / acts as a directory path separator. URL-Safe Base64 (RFC 4648 §5) substitutes + with - (hyphen) and / with _ (underscore), while optionally omitting trailing = padding characters. This format is heavily utilized in JWT tokens and URL query parameters.

Frequently Asked Questions

Is Base64 an encryption method?
No. Base64 is purely an encoding mechanism for data transport. It provides zero confidentiality and can be decoded by anyone instantly.
Can I encode international UTF-8 characters?
Yes. This tool uses native TextEncoder to properly encode Unicode codepoints (like emojis and non-Latin scripts) into UTF-8 byte streams before Base64 conversion, preventing the classic JavaScript btoa character-out-of-range exception.
Are my uploaded files stored on your servers?
Never. All file reading, image rendering, and text encoding runs 100% locally in your browser memory.

We use cookies to run this site. Analytics cookies are optional and only load if you accept. See our Privacy Policy.