What is Base64?
Base64 encodes binary data (images, files or any bytes) as plain text using 64 safe characters: A–Z, a–z, 0–9, + and /. It's used wherever binary data has to travel through systems built for text, such as email attachments, JSON APIs, data URLs and HTTP authentication headers.
Base64 is an encoding, not encryption. Anyone can decode it, so never use it to hide passwords or secrets.
How to use this tool
- Encode: type or paste text and click Encode. Emoji and all languages are supported (UTF-8).
- Decode: paste a Base64 string and click Decode. Standard and URL-safe Base64 are detected automatically, and missing padding is fixed.
- File to Base64: drop a file to get a
data:URL you can paste straight into an<img src>or CSSurl().
Frequently asked questions
What is URL-safe Base64?
Standard Base64 uses + and /, which have special meanings in URLs. URL-safe Base64 (RFC 4648 §5) replaces them with - and _ and usually drops the = padding. JWT tokens use this variant.
Why is the Base64 output larger than the input?
Base64 represents every 3 bytes with 4 characters, so encoded data is about 33% larger than the original.
Is my data uploaded?
No. Encoding and decoding happen entirely in your browser.