Base64 Encoder/Decoder
Encode text or files to Base64 and decode Base64 strings instantly. All processing in your browser.
Base64 Encoder / Decoder
Encode text to Base64 or decode Base64 back to text. Drag and drop files for file-to-Base64 conversion.
How to Use Base64 Encoder/Decoder
- 1
Enter your input
Type or paste text to encode, or paste a Base64 string to decode. You can also drag and drop a file onto the input area.
- 2
Select mode
The tool auto-detects whether your input is Base64 or plain text. You can manually switch between Encode and Decode modes.
- 3
Copy the result
Click the Copy Output button to copy the encoded or decoded result to your clipboard.
Frequently Asked Questions
Related Tools
How Base64 Encoding Works Under the Hood
Base64 converts binary data into a 64-character alphabet (A-Z, a-z, 0-9, +, /) that is safe to transmit over text-only channels. Every 3 bytes of input become 4 Base64 characters, which is why Base64 output is always ~33% larger than the original. The padding character (=) fills the output to a multiple of 4 when the input length is not divisible by 3.
Common Uses in Web Development
Data URIs embed small images directly in CSS or HTML as Base64 strings, eliminating an HTTP request at the cost of ~33% larger payload. JSON APIs use Base64 to transmit binary data (file uploads, cryptographic keys) within string fields. Email attachments use Base64 encoding (via MIME) because SMTP was designed for 7-bit ASCII text. JWTs encode their header and payload as Base64URL — a URL-safe variant that replaces + with - and / with _.
Base64 Is Encoding, Not Encryption
A common misconception is that Base64 provides security. It does not — anyone can decode a Base64 string instantly. It is a reversible encoding, not encryption. Never use Base64 to "hide" sensitive data like passwords or API keys. If you need to protect data, use actual encryption (AES-256, for example) and then optionally Base64-encode the encrypted output for safe transmission.