Base64 Encode/Decode
Encode text or a file to Base64, or decode Base64 back to text. Unicode-safe.
Text
File to Base64 (data URI)
Click to add a file or drop it here
Encode text or a file to Base64, or decode Base64 back to text. Unicode-safe.
Click to add a file or drop it here
Type or paste into the Text box and click Encode or Decode. To turn a whole file into a Base64 data URI instead, drop it into the second section - the data URI appears ready to copy.
Plain btoa() breaks on non-ASCII characters (accents, emoji, non-Latin scripts). This uses TextEncoder/TextDecoder alongside btoa/atob instead, so Unicode text round-trips correctly.
Embedding a file directly inside HTML or CSS (as an <img src="data:..."> or a CSS background-image) without a separate network request.
No, both encoding and decoding happen entirely in your browser.
32 visits