Base64 Encoder/Decoder
What is Base64?
Base64 is a binary-to-text encoding scheme that represents binary data using a set of 64 ASCII characters — A–Z, a–z, 0–9, +, and /. It is commonly used to embed binary data in text-based formats like JSON, HTML, emails, and URLs.
How it works
The encoding process takes every 3 bytes (24 bits) of input and splits them into four 6-bit groups. Each group maps to one of the 64 characters. If the input length isn't a multiple of 3, the output is padded with = characters.
How to use this tool
- Type or paste plain text on the left — it is automatically encoded to Base64 on the right
- Type or paste a Base64 string on the right — it is automatically decoded to plain text on the left
- Toggle URL-safe mode to use
-and_instead of+and/, which is safer for URLs and filenames
Common use cases
- Embedding images in CSS or HTML as
data:URIs - Encoding credentials for
Authorization: BasicHTTP headers - Transferring binary data through JSON APIs or email (MIME)
- Storing binary blobs in text-only environments like environment variables or config files