Base64 Encode & Decode
Encode text to Base64 or decode Base64 to text. Supports file-to-Base64 conversion.
How to Use
- Select mode: Encode (text → Base64) or Decode (Base64 → text).
- Type in the left input box, or click Upload File to upload a file (up to 5MB).
- Click Encode → or Decode → to convert.
- The right panel shows the result. Click Copy to copy it to clipboard.
About Base64 Encoder & Decoder
Use Cases
Embed Images in HTML/CSS
Convert small images to Base64 data URIs for inline embedding, eliminating extra HTTP requests.
API Authentication
Encode credentials for HTTP Basic Auth headers (username:password → Base64).
Email Attachments (MIME)
Email protocols use Base64 to encode binary attachments within text-based MIME messages.
Data URL Schemes
Embed fonts, SVGs, or small assets directly in CSS/HTML using data:...;base64, prefixes.
Examples
Hello, World!
SGVsbG8sIFdvcmxkIQ==
Standard Base64 encoding of ASCII text. Each 3 bytes of input become 4 Base64 characters.
SGVsbG8sIFdvcmxkIQ==
Hello, World!
Decoding reverses the process. The '=' padding indicates the last group had fewer than 3 bytes.
Common Pitfalls & Edge Cases
- ⚠Base64 increases data size by ~33%. Don't use it for large files where binary transfer is available.
- ⚠Base64 is encoding, NOT encryption. It provides zero security — anyone can decode it.
- ⚠URL-safe Base64 uses '-' and '_' instead of '+' and '/'. Make sure you use the right variant for URLs.
- ⚠Line breaks in Base64 (e.g., MIME format with 76-char lines) must be stripped before decoding.
🔒 Data Privacy
All encoding and decoding runs entirely in your browser. Files are read locally via the File API and never uploaded to any server.
Standards & References
Frequently Asked Questions
Comments (0)
Leave a comment