Base64 Encoder
Encode text or a file to Base64
Plain text
Base64
TG9jYWxCZW5jaCBydW5zIGVudGlyZWx5IGluIHlvdXIgYnJvd3Nlci4=
A Base64 encoder for text and files alike. Type text and the output updates live as you go, or upload an image, PDF, or any other file to encode its raw bytes directly — useful for building Basic Auth headers, data: URIs, and any format that needs binary-safe text.
- Is my text or file uploaded anywhere?
- No. Both typed text and uploaded files are read and encoded entirely in your browser — nothing you type or upload is sent to a server.
- Can I encode a file, not just text?
- Yes — click Upload file to pick an image, PDF, or any other file. It's read as raw bytes and encoded directly, with an image preview shown alongside it, so you get the exact same Base64 you'd get from encoding the file on a server.
- Does it handle non-English text and emoji?
- Yes. Typed text is encoded as UTF-8 before Base64 conversion, so accented characters, non-Latin scripts, and emoji round-trip correctly — not just plain ASCII.
- What is Base64 actually used for?
- Embedding binary-safe data in places that only accept text — JSON payloads, URLs, Basic Auth headers, data: URIs for inline images, and email attachments (MIME).