Base64 Encoder / Decoder

Encode or decode Base64 with full UTF-8 support (emoji and non-Latin text included), or turn any file into a data URI. Everything runs locally in your browser.

Direction:

File to data URI

Pick a file to get its data:<mime>;base64,... string, ready to inline into HTML, CSS, or JSON. The file never leaves your machine.

How it works: plain btoa() breaks on any character outside Latin-1, so this tool routes text through TextEncoder / TextDecoder first, making it safe for emoji, accents, and every Unicode script. Auto-detect treats input as Base64 when it is well-formed and decodes to valid UTF-8; otherwise it encodes. Data URIs are about 33% larger than the original file, so they are great for small icons and inline assets but a bad idea for large files.