Base64 Encode and Decode Online
Base64 shows up in more places than most people realize: embedding an image directly inside HTML or CSS, sending binary data through APIs that only accept text, or reading the payload of a token that starts with eyJ. A Base64 encoder/decoder converts between the raw value and its Base64 text form in either direction, instantly.
What Base64 actually is
Base64 takes binary data — bytes — and re-represents it using only 64 printable characters (A–Z, a–z, 0–9, +, /). It doesn't compress or encrypt anything; it's purely a safe way to carry arbitrary bytes through systems (like text-based protocols, JSON, or URLs) that weren't designed to handle raw binary. That's why a Base64 string is always about a third longer than the original data — it's trading size for compatibility.
Where you'll actually run into it
- Data URIs — embedding a small image directly in HTML with
<img src="data:image/png;base64,...">instead of a separate file request. - API authentication — Basic Auth headers send
username:passwordBase64-encoded (not encrypted — it's reversible, so this only makes sense over HTTPS). - Email attachments — MIME encodes binary attachments as Base64 so they survive being carried over text-only SMTP.
- Reading token payloads— a JWT's header and payload segments are Base64URL text you can decode to see the raw JSON underneath.
Encode vs. decode — knowing which you need
If you're starting from plain text or a file and need the Base64 form, you're encoding. If you've got a block of Base64 text and want to see what it actually says, you're decoding. It's easy to mix these up when you're moving quickly — the tool takes either direction, so a wrong guess costs you one click, not a re-paste.
How to encode or decode Base64
- Open the Base64 Encoder/Decoder.
- Paste your text (or Base64 string) and pick encode or decode.
- The conversion runs instantly, entirely on your device — nothing is sent anywhere.
- Copy the result.
A note on "security"
Base64 is encoding, not encryption. Anyone can decode it back to the original in one step — it provides zero confidentiality. If you need something that actually can't be read without a key, you want encryption or hashing, not Base64. For one-way fingerprints (checksums, password hashes), use the Hash Generatorinstead — hashing can't be reversed the way Base64 can.
Related developer tools
If what you're actually decoding is a URL-encoded string (percent signs, not Base64 characters), that's a different format — use URL Encoder/Decoderinstead. And once you've decoded a Base64 payload back into readable JSON, the JSON Formatter will make it readable.
Frequently asked questions
Is Base64 a form of encryption?
No — it's an encoding, not encryption. Anyone can decode Base64 back to the original in one step, so it provides no confidentiality on its own.
Is my data uploaded anywhere?
No — encoding and decoding both happen entirely in your browser. Nothing you paste is sent to a server.
What's the difference between encoding and decoding here?
Encoding takes plain text or data and produces its Base64 form. Decoding takes Base64 text and recovers the original. The tool handles both directions.
Why is the Base64 output longer than my original text?
Base64 represents binary data using only 64 printable characters, which takes more characters than the raw bytes — output is roughly a third longer than the input.
Can I decode a JWT with this?
You can decode a JWT's individual Base64URL segments here, but for reading the header and payload as JSON directly, the JWT Decoder does that in one step.