Base64 Encoder / Decoder
Convert text to and from Base64. Use Encode, Decode, or Auto Detect mode to quickly transform payloads for APIs, HTTP headers, data URLs, and other text-based protocols. All processing happens in your browser.
Input
Output
What Is Base64 Encoding?
Base64 is a binary-to-text encoding scheme that represents binary data as ASCII text. It is widely used in HTTP, email (MIME), data URLs, and APIs to safely transmit binary content—such as images or files—over text-based channels that only support printable characters.
Instead of sending raw bytes, you encode them as Base64, transmit the text, and then decode it back on the other side.
Common Use Cases
- Encoding binary data inside JSON payloads for APIs.
- Embedding small images or files inside HTML or CSS using data URLs.
- Inspecting Base64 payloads found in logs, tokens, or configuration files.
- Converting text to Base64 for testing or debugging integrations.
When to Encode vs Decode
- Encode when you have plain text or binary data and need a Base64 representation.
- Decode when you have a Base64 string and want to see the original text.
- Auto Detect when you are not sure: the tool examines the input and chooses the most likely direction.
API Usage
Automate Base64 encoding and decoding through the HeffTools API:
POST /api/v1/base64
{
"mode": "encode", // or "decode"
"text": "hello world"
}
Example response:
{
"input_length":11,
"mode":"encode",
"result":"aGVsbG8gd29ybGQ="
}
Related Tools
URL Encode / Decode · JWT Decoder · JSON / YAML / CSV Converter