Base64 Encoder & Decoder

Converts as you type, in both directions. Handles accents, CJK and emoji correctly via UTF-8, supports URL-safe output, and can turn a file into a data URI.

Unicode & emoji safe URL-safe mode File → data URI

0 characters

0 characters

Encode a file as a data URI

Drop a file here, or click to choose

Images, fonts, PDFs — anything under 2 MB

Frequently asked questions

Because they call btoa() directly, which only accepts characters below code point 256 and throws or corrupts anything else. This tool converts your text to UTF-8 bytes first with TextEncoder, so “héllo 🚀” round-trips exactly.
No — it is an encoding, not a cipher. Anyone can decode it in one step with no key, so never use it to hide passwords or tokens. Its purpose is safely carrying binary data through text-only channels such as JSON, email and data URIs.
A variant (RFC 4648 §5) that replaces + with - and / with _ and drops the = padding, so the result survives being put in a URL or filename. JWTs use it. The decoder here accepts both variants automatically.
Base64 represents 3 bytes as 4 characters, so it always adds about 33%. That overhead is the price of inlining an asset — worth it for a small icon that saves a network request, wasteful for a large photo.