Base64 Encoder & Decoder
Preview
What Base64 is for
Base64 turns any data into plain letters, digits and a couple of symbols, so binary content can travel through channels that only accept text — a JSON field, an email attachment, a data URI in CSS. It is an encoding, not a lock: everything encoded here can be decoded by anyone.
Where you meet it
- Data URIs — small images embedded straight into HTML or CSS.
- JWTs — each part of a token is URL-safe Base64.
- Basic authentication — the header is Base64, which is exactly why it needs HTTPS.
- Email attachments — MIME has used it since the 1990s.
Share this tool with friends
Free to use, no sign-up, works on any phone.
Frequently Asked Questions
No, and treating it as one is a common and costly mistake. It is a reversible encoding with no key — anyone can decode it in a second. Never use it to hide a password or a token.
The browser's built-in btoa only handles single-byte characters. This tool encodes text as UTF-8 first, so Hindi, accents and emoji all survive the round trip intact.
Standard Base64 uses + and /, which have their own meaning inside a URL. The URL-safe variant swaps them for - and _ and drops the padding, so the result can sit in a query string or a JWT.
Base64 stores three bytes as four characters, so it is always about 33 per cent larger. That is the price of sending binary data through a text-only channel such as JSON or email.
It embeds a small image directly in HTML or CSS, saving a network request. It suits icons and tiny graphics; for anything large the 33 per cent overhead outweighs the saved request.