Base64 encode and decode, instantly.
Convert text, files and images to Base64 and back. Emoji and accents are handled correctly, and nothing ever leaves your browser.
Text to encode
Base64 result
Where Base64 is used
Embedding images
Data URIs like data:image/png;base64,… put a small image straight into HTML or CSS, saving a request.
APIs and tokens
HTTP Basic auth, JSON Web Tokens and many APIs send binary or text safely as Base64.
Email attachments
MIME encodes attachments as Base64 with 76-character lines, which is what the line-wrap option produces.
Not encryption
Base64 only changes how data is written. Anyone can decode it, so never use it to hide passwords or secrets.
Questions people ask
What is Base64?
Base64 is a way to write any data, including text and files, using only 64 safe characters (A–Z, a–z, 0–9, + and /). It is used to send binary data through systems that only handle plain text, such as email, JSON and URLs.
Is Base64 encryption?
No. Base64 is an encoding, not encryption, so anyone can reverse it instantly. Never use it to protect passwords or private data.
What is URL-safe Base64?
Standard Base64 uses + and /, which have special meaning in URLs. URL-safe Base64 swaps them for - and _ and often drops the = padding, so the result can be used in links, filenames and JWTs.
Does it handle emoji and non-English text?
Yes. Text is converted to UTF-8 before encoding and read back as UTF-8 when decoding, so accents, emoji and non-Latin scripts survive the round trip. Many simple tools get this wrong.
Can I convert an image or file to Base64?
Yes. Choose a file (up to 25 MB) in Encode mode and tick “Add data URI prefix” to get a string you can paste straight into HTML or CSS. In Decode mode, an image is previewed and any result can be saved as a file.
Why does decoding say my input is invalid?
Valid Base64 only contains letters, digits, +, /, - and _ with optional = padding at the end. Spaces and line breaks are ignored, but other characters are not. A length that leaves one stray character at the end is also invalid.