How to Base64 Encode and Decode Text Online
Base64 shows up everywhere in web development and data handling. Here's how to encode or decode it online, free, in seconds.
Try it now: Base64 Encode/Decode →
Base64 is a way of representing binary data as plain text, using only letters, numbers, and a couple of symbols — which makes it safe to embed in places that expect text, like URLs, JSON, or email. It's not encryption; it's just a different, text-safe representation of the same data.
When you need Base64 encoding or decoding
- Embedding a small image directly into HTML or CSS as a data URI
- Decoding a Base64 string returned by an API to see its actual content
- Encoding data safely for inclusion in a URL, JSON payload, or config file
- Debugging a token, payload, or config value that's Base64-encoded
How to Base64 encode or decode, step by step
- Open Base64 Encode/Decode.
- Paste the text or data you want to encode, or the Base64 string you want to decode.
- Choose encode or decode.
- Copy the result.
Tips for working with Base64
- Base64 is not encryption. Anyone can decode it back to the original data instantly — don't use it to protect sensitive information; use AES Encrypt/Decrypt for that instead.
- Watch for URL-safe variants. Some systems use a slightly different Base64 alphabet for URLs — if decoding fails, check whether the source uses a URL-safe variant.
- Base64 output is always longer than the original. Roughly a third larger — that's expected, not an error.
Common questions
Is Base64 a form of encryption? No — it's just an encoding scheme, fully reversible by anyone without a password or key. It's for compatibility, not security.
Why does the encoded text look longer than the original? Base64 encoding expands data by roughly 33% — this is a normal, expected side effect of the encoding scheme.
Can I encode a whole file, not just text? This tool is built around text input and output; for file-level encoding needs, check whether your specific workflow requires a different approach.
Need to encode or decode Base64? Use the Base64 tool for free →