BASE64 ENCODER / DECODER TOOL
Base64 Encoder/Decoder
Convert text to Base64, decode Base64 to text, or encode images to Base64. Perfect for embedding images in CSS, HTML, or JSON.
Base64 is a binary-to-text encoding scheme that represents binary data in an ASCII string format. It's commonly used when there's a need to encode binary data, especially when that data needs to be stored and transferred over media that are designed to deal with text.
This encoding helps ensure that the data remains intact without modification during transport. Base64 is commonly used in a number of applications including email via MIME, and storing complex data in XML or JSON.
Common Use Cases
- Embedding images directly in HTML, CSS, or JSON
- Sending binary data through APIs and web services
- Encoding user credentials (e.g., Basic Authentication)
- Data URIs in modern browsers
- Storing binary data in databases not optimized for it
Technical Details
Base64 encoding increases the data size by approximately 33% (4/3 of the original), as it represents 3 bytes of data with 4 ASCII characters. The algorithm processes data in 24-bit groups, dividing them into four 6-bit groups which are then represented as printable characters.
The character set used consists of A-Z, a-z, 0-9, + and /, with = used for padding. Some URL-safe variants replace + and / with - and _ to avoid issues in URLs and filenames.