Base64 Encoder
Encode any text to Base64, including Unicode and emoji. All processing happens in your browser — nothing is sent to a server.
Tip: Press Ctrl+Enter to encode.
What is Base64 encoding?
Base64 is a binary-to-text encoding scheme that represents arbitrary binary data as a sequence of printable ASCII characters. It divides input bytes into groups of three, then maps each group to four characters from a 64-character alphabet (A–Z, a–z, 0–9, +, /).
When is Base64 used?
- Email attachments — MIME encoding uses Base64 to safely transmit binary files through protocols designed for text.
- Data URIs — embed images or fonts directly in HTML/CSS as
data:image/png;base64,...strings. - API payloads — pass binary content (files, cryptographic keys) in JSON fields that only accept strings.
- JWT tokens — each part of a JSON Web Token is Base64URL-encoded (a variant that uses
-and_instead of+and/).
Important note on Unicode
The standard btoa() function only handles Latin-1 characters. This tool converts your input to UTF-8 bytes first, then encodes to Base64, so all Unicode characters — including emoji — are handled correctly.
Is Base64 encryption?
No. Base64 is an encoding format, not encryption. Anyone can decode a Base64 string back to its original content without a key. Do not use Base64 to protect sensitive data.