Encode and decode Base64 strings
Base64 is a binary-to-text encoding scheme that represents binary data in an ASCII string format. It uses a set of 64 characters (A-Z, a-z, 0-9, +, /) to encode data. This makes it safe to transmit binary data through text-based protocols like HTTP, SMTP, or within JSON payloads.
Every 3 bytes of binary data are encoded as 4 Base64 characters. The encoding is reversible — any Base64-encoded string can be decoded back to its original binary form.
Embedding images directly in HTML or CSS using data URIs. Sending binary files through JSON APIs. Storing binary data in databases that only support text. Encoding credentials for HTTP Basic Authentication. Obfuscating data (not for security — Base64 is not encryption).
Select Encode mode to convert text to Base64. Paste your text and the encoded output appears instantly. Select Decode mode to convert Base64 back to text. Use the Swap button to quickly toggle between modes.
The tool handles URL-safe Base64 encoding automatically, converting + and / to - and _ as needed.