Base64 Encode / Decode

File → Base64 / Data URI

About this tool

Convert text to Base64 and back. Unlike naive implementations, this tool encodes via UTF-8 first, so Chinese characters, emoji and any Unicode text round-trip correctly. The URL-safe option outputs the RFC 4648 variant (- and _ instead of + and /) used in JWTs and URLs.

You can also turn any file into a Base64 data URI (with a live preview for images) and preview a Base64 string as an image. Everything runs entirely in your browser — nothing is sent to a server, so it is safe for secrets and tokens.

Related tools

URL Encoder / DecoderJSON FormatterHash Calculator