What is Base64?
Base64 represents binary data — images, files, text in any language — using only 64 safe characters (A–Z, a–z, 0–9, + and /). It is used to move data through text-only channels: email, APIs, JWT tokens, and embedding images directly in HTML/CSS as Data URIs.
Important: Base64 is an encoding, not encryption. Anyone can decode it, so never use it to hide passwords or sensitive data.
How to use it
- Choose Encode or Decode.
- Type or paste your input; the output updates instantly.
- Enable “URL-safe” to replace + and / with - and _ and strip = padding.
- “Swap” moves the output to the input and flips the mode to verify the result.
- Use “Convert a file to Base64” to get a ready Data URI for images or files.
Why it handles any language correctly
The browser’s built-in btoa only accepts Latin-1 characters and fails on Arabic or emoji. This tool converts text to UTF-8 bytes first, so it works with any language and decodes back to the exact original text.
When to use Data URIs
Inlining very small icons saves an HTTP request but adds about 33% to the size. For larger images, upload compressed files instead.