Base64 Encode Decode
Base64 Encode Decode converts text or files to Base64 and back. It is used for data URLs, email attachments, API tokens and storing binary content inside text formats.
Share this page:
Base64 Encode Decode converts text or files to Base64 and back. It is used for data URLs, email attachments, API tokens and storing binary content inside text formats.
Why use Base64 Encode Decode
- Create a data URL for a small image embedded in CSS or HTML.
- Decode a token or header value to inspect its contents during debugging.
- Move small binary files through a text-only channel.
Running Base64 Encode Decode step by step
- Choose Encode to turn input into Base64, or Decode to reverse it.
- Paste the text or upload a file, depending on the direction you need.
- Click Generate and copy the output.
Good to know before you start
Base64 is for transport, not protection. Treat encoded data as public unless it is separately encrypted.
Practical notes
Base64 has a fixed alphabet and padding rules. A decoded value that looks garbled is often URL-safe Base64 or a different character set, not corrupted data.
Mistakes worth avoiding
- Using Base64 to hide a password or API key.
- Feeding line-wrapped Base64 into a decoder that expects one continuous string.
FAQ
Is Base64 encryption?
No. It is a reversible encoding, not a security measure. Anyone can decode it, so never use it to hide passwords or secrets.
Why does the encoded text get larger?
Base64 represents three bytes as four characters, so the output is roughly 33 percent larger than the input.
Why does decoding fail?
The input may contain line breaks, missing padding or characters outside the Base64 alphabet. Remove whitespace and check the padding at the end.
Related Tools
More free tools you may like