Base64 Encode and Decode
Encode text to Base64, decode Base64 to plain text, and handle Unicode safely in the browser.
Encode or decode Base64 text
Base64 turns bytes into printable ASCII characters. It is useful when a text-only format or protocol must carry data that may not be safe to place there directly. Paste plain text and choose Encode, or paste standard Base64 and choose Decode. The conversion runs in your browser, and this tool treats text as UTF-8 so names, non-Latin scripts, and emoji survive the round trip.
For example, encoding Hello, 世界 produces a transport-friendly string. Decoding that string recovers the original text, not a protected version of it.
Base64 solves compatibility, not security
Any Base64 value can be decoded without a password or key. Please don’t use Base64 to obfuscate an API key, encrypt a password, or protect personal data. HTTP Basic Authentication encodes a username and password in Base64 so it has to be sent over HTTPS; the encoding does not provide any confidentiality.
Common legitimate uses include:
- embedding small binary resources in a data URI;
- carrying attachments in MIME email;
- representing bytes in JSON or XML fields;
- inspecting the encoded header or payload of a JWT.
This page is made for converting text, not random uploaded files. If you are working with raw file bytes, use a file-aware encoder so the browser does not try to interpret those bytes as text first.
Standard Base64 and Base64url are different alphabets
Standard Base64 uses + and /, and often ends with = padding. Base64url replaces those two characters with - and _; JWTs normally omit the padding. That avoids characters with special meaning in URLs and filenames.
The decoder on this page expects standard Base64. For a JWT, use the JWT Decoder, which understands the token's Base64url sections and also keeps the important distinction between decoding and signature verification.
Handle decoded text with context
A successful decode only proves that the input could be interpreted as Base64 and UTF-8 text. It does not prove where the value came from, whether it was modified, or whether it is safe to render. If the decoded value will become HTML, a shell argument, a database query, or another executable context, apply the escaping and validation rules for that destination.
FAQ
Why does some Base64 end with =?
If byte length is not a multiple of three , then padding fills the last four-character block . Some protocols retain it, but Base64url profiles such as JWT tend to omit it.
Is Base64 encryption?
No. It is an invertible encoding without secret key. If confidentiality is the requirement, use an established encryption scheme.
What's the difference between Base64 and Base64url?
Base64url replaces + with - and / with _, and commonly removes = padding. The data is still encoded rather than encrypted.