Base64 Encoder/Decoder
Encode text or files to Base64, or decode Base64 back to text.
About Base64 Encoder/Decoder
Encode text or files to Base64, or decode Base64 back to its original form, both in the same tool, switchable with a toggle. File encoding happens in a separate tab for uploads up to 10MB.
How to use it
- Choose the Text or File tab.
- For text, type or paste content and use the switch button to toggle between encode and decode.
- For files, drop a file (up to 10MB) to get its Base64 representation.
- Copy the result with the copy button.
Common use cases
- Embedding a small image as a data URI in CSS or HTML
- Decoding a Base64-encoded segment from a JWT or API payload
- Encoding binary content for a config file or environment variable
Example
Before
hello world
After
aGVsbG8gd29ybGQ=
Encoding is fully reversible with no key required — switch to Decode and paste the Base64 string back in to get the original text.
Common errors
"That doesn't look like valid Base64" error
Base64 text should only contain A-Z, a-z, 0-9, +, /, and = padding at the end — stray whitespace, line breaks, or base64url characters (- and _ instead of + and /) need to be normalized first.
Assuming Base64 keeps data secret
It doesn't — anyone can decode it with no key. See the Base64 vs. Encryption guide if you actually need security, not just text-safe encoding.
Decoding produces garbage or fails on a copy-pasted string
Base64 has strict padding rules; a string that's missing trailing = characters or got truncated during copy-paste won't decode cleanly.
FAQ
What happens if I try to decode invalid Base64?
The tool shows a clear "that doesn't look like valid Base64" error instead of a broken result.
Is there a file size limit?
Yes, files up to 10MB.
Can I convert an image or other file to Base64?
Yes — switch to the File tab and drop a file up to 10MB to get its Base64 representation, useful for embedding as a data URI. Note this direction only: decoding Base64 back into a downloadable file isn't supported yet, only back to plain text.