Encode text to Base64 or decode Base64 strings back to readable text. Supports file uploads for encoding.
Plain Text
Overview: Base64 is a binary-to-text encoding method that converts binary data into a string of printable ASCII characters. This encoding ensures data remains intact during transmission through text-based protocols.
Base64 encoding is essential when binary data needs to be stored or transferred over media designed primarily for text. It prevents data corruption by converting binary information into a safe, text-based format.
Common Applications:
• Email attachments via MIME protocol
• Embedding images in HTML/CSS (Data URLs)
• JSON Web Tokens (JWT) and API authentication
• Storing complex data in XML or JSON formats
• SSL certificates and cryptographic keys
Encoding Process:
Base64 uses 64 characters: A-Z, a-z, 0-9, +, and /. The encoding process converts every 3 bytes (24 bits) of binary data into 4 Base64 characters (each representing 6 bits).
Example: Encoding "Man"
Text: Man
ASCII: 77 (M), 97 (a), 110 (n)
Binary: 01001101 01100001 01101110
6-bit groups: 010011 010110 000101 101110
Decimal: 19, 22, 5, 46
Base64: TWFu
Key Characteristics:
• Output is ~33% larger than input (3 bytes → 4 characters)
• Padding character (=) aligns output to 4-character boundaries
• URL-safe variant uses - and _ instead of + and /
• Completely reversible - no data loss during encoding/decoding
• Not encryption - encoded data is easily decoded
Practical Example:
The famous quote from Thomas Hobbes's Leviathan:
Original: "Man is distinguished, not only by his reason, but ..."
Base64: TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5vdCBvbmx5IGJ5IGhpcyByZWFzb24sIGJ1dCAuLi4=
Important Notes:
• Base64 is encoding, not encryption - do not use for security
• Different character sets (UTF-8, ASCII) may produce different results
• Whitespace and line breaks may affect decoding
• Always verify decoded binary data integrity
📚 Learn More:
• Read our comprehensive Complete Guide to Base64 Encoding
• Explore Image to Base64 Converter for working with images
Free online developer tools and utilities for encoding, formatting, generating, and analyzing data. No registration required - all tools work directly in your browser.
Built for developers, by developers. Privacy-focused and open source.
Free online tools for Base64 encoding, JSON formatting, URL encoding, hash generation, UUID creation, QR codes, JWT decoding, timestamp conversion, regex testing, and more.
© 2024 NarvikHub. All rights reserved.