Free tool
Base64 Encoder
Turn text or a file into a Base64 string.
Base64 turns arbitrary binary data into plain ASCII text, which is why it shows up wherever a text-only format has to carry binary content: embedding an image directly in CSS or HTML, attaching a file to an email, or passing bytes through an API or config file that only accepts strings.
Paste text or pick a file and the encoded string appears immediately, computed in this tab. Expect the result to be about a third larger than the input — that is the cost of using only 64 safe characters to represent every possible byte.
How to use it
- 01Choose Text to encode something you type, or File to encode a file.
- 02Paste the text, or pick the file.
- 03Copy the Base64 string that appears below.
Frequently asked questions
Why is the Base64 output bigger than my input?
Base64 represents every 3 bytes with 4 text characters, so the output is roughly 33% larger, plus padding. That overhead is the price of being safe to put in text-only formats.
Is Base64 encryption?
No, and this matters: it is an encoding, not a cipher. Anyone can decode it instantly with no key — including with our own decoder. Never use it to protect a secret; use real encryption for that.
Can I encode an image to use in CSS or HTML?
Yes. Encode the image file here, then use it as a data URI: prefix the string with `data:image/png;base64,` (matching your image type). It saves a network request, at the cost of a larger stylesheet that can no longer be cached separately.
Is my file uploaded?
No. The conversion runs in this tab and the file never leaves your device — we operate no endpoint that could receive it. The page does count an anonymous “encoded a file” event, which carries nothing about the file.
Related tools
- Base64 DecoderDecode a Base64 string back to text, or to the file it came from.
- JWT DecoderDecode a JWT's header and payload, and check its expiry — signature is not verified.
- File Hash / Checksum GeneratorGenerate SHA-1, SHA-256 or SHA-512 checksums for a file or a piece of text.
- File EncryptionEncrypt a file with a passphrase before uploading it anywhere — AES-256-GCM, fully local.
This is what Purgify automates.
Connect your cloud accounts and Purgify finds duplicates and reclaimable space like this — across all of them, on a schedule.