How to Use
Choose Encode or Decode mode:
- Encode: Paste text → get Base64 output
- Decode: Paste Base64 → get original text
- URL-safe: Toggle to use - and _ instead of + and /
- Data URI: Generates a complete data:text/plain;base64,... URI
How Base64 Works
Base64 splits input into 6-bit groups (instead of 8-bit bytes), mapping each to one of 64 characters. Three bytes (24 bits) become four Base64 characters. If the input isn't a multiple of 3 bytes, = padding characters are added.
This means Base64 output is always ~33% larger than the input.
Base64 Variants
- Standard (RFC 4648): A-Z, a-z, 0-9, +, / with = padding
- URL-safe: Replaces + with - and / with _ (safe in URLs)
- MIME: Standard + line breaks every 76 characters (email)
Step-by-Step Instructions
- 1Select Encode or Decode mode.
- 2Paste or type your input text.
- 3View the instant encoded/decoded output.
- 4Toggle URL-safe mode if needed for URLs or filenames.
- 5Copy the result or generate a data URI.