Our free online Base64 Encoder & Decoder allows you to convert text to Base64 encoding and decode Base64 strings back to readable text instantly. All processing happens in your browser - your data never leaves your device.
Base64 is a binary-to-text encoding scheme that represents binary data using 64 ASCII characters. It's commonly used to encode data that needs to be stored or transferred over media designed for text. The character set includes A-Z, a-z, 0-9, +, and /, with = used for padding.
Email Attachments: MIME encoding uses Base64 for binary attachments
Data URLs: Embedding images directly in HTML/CSS
API Authentication: Basic Auth headers use Base64 encoding
JSON/XML Data: Encoding binary data for text-based formats
Storing Binary in Databases: When binary fields aren't available
Base64 encoding takes 3 bytes (24 bits) of input and converts them into 4 ASCII characters (6 bits each). This means Base64-encoded data is approximately 33% larger than the original. If the input isn't divisible by 3 bytes, padding (=) is added.
Unlike URL encoding which only escapes special characters, Base64 converts ALL data. It's not encryption - Base64 is easily reversible and provides no security. For secure transmission, always use HTTPS and proper encryption.
Base64 increases data size by ~33%, so it's not ideal for large files. Some Base64 variants exist (URL-safe Base64 uses - and _ instead of + and /). Very long Base64 strings may have line breaks in some implementations.
The standard Base64 alphabet consists of 64 characters: uppercase letters (A-Z), lowercase letters (a-z), digits (0-9), plus (+), and forward slash (/). The equals sign (=) is used for padding when the input length isn't a multiple of 3 bytes.
1. Convert input text to binary (using ASCII or UTF-8)
2. Split binary into groups of 6 bits
3. Convert each 6-bit group to its Base64 character
4. Add padding (=) if needed to make output length divisible by 4
Data URIs: data:image/png;base64,iVBORw0KGgo...
Basic Auth: Authorization: Basic dXNlcjpwYXNz
JWT Tokens: Header and payload sections are Base64URL encoded
Email: MIME uses Base64 for non-ASCII content
Standard Base64 uses + and / which have special meaning in URLs. URL-safe Base64 (Base64URL) replaces + with - and / with _. This variant is used in JWTs, data URLs, and anywhere Base64 appears in URLs.