ENCODER / DECODER

Encode and decode Base64
instantly

Convert text or binary data to Base64 and back. Runs 100% in your browser, nothing uploaded or stored.

πŸ”’ Your data never leaves this page. Nothing is uploaded or stored.

Input 0 chars
Output 0 chars
Ready
AI Content Detection Claude

What is Base64 Encoding?

Base64 is a binary-to-text encoding scheme that converts binary data into ASCII text format using a set of 64 characters (A-Z, a-z, 0-9, +, /). It's one of the most widely used encoding methods for transmitting binary data through text-based protocols that don't support raw binary.

When you encode data to Base64, every 3 bytes of input are converted to 4 characters of output, which means the encoded data is approximately 33% larger than the original. This trade-off is acceptable because it ensures data integrity when passing through systems that might corrupt binary data, such as email servers, JSON APIs, or XML documents.

This Base64 encoder/decoder runs entirely in your browser using JavaScript. Your data never leaves your device or gets sent to any server, making it completely safe for sensitive information like API keys, authentication tokens, or proprietary files.

Common Use Cases

API Authentication

Encode username:password combinations for HTTP Basic Authentication headers. Base64 is the standard format for transmitting credentials in API requests.

Email Attachments

Email protocols like SMTP require Base64 encoding for binary attachments. Files are encoded before transmission and decoded by the recipient's email client.

Data URLs

Embed images, fonts, or other files directly in HTML/CSS using data: URLs with Base64 encoding. Eliminates separate HTTP requests for small assets.

JWT Tokens

JSON Web Tokens use Base64URL encoding (a variant of Base64) for the header and payload sections. Decode JWTs to inspect claims and metadata.

Config Files

Store binary data like certificates, keys, or encrypted secrets in text-based configuration files (YAML, JSON, TOML) using Base64 encoding.

Binary Data Transfer

Transfer binary files through JSON APIs, XML documents, or other text-only protocols. Base64 ensures data integrity across different systems.

Base64 Character Set

Value Range Characters Description
0-25 A-Z Uppercase letters
26-51 a-z Lowercase letters
52-61 0-9 Digits
62 + Plus sign
63 / Forward slash
Padding = Padding character (used when input length is not divisible by 3)

How to Use This Tool

1

Paste your data

Enter the text you want to encode, or paste a Base64 string you want to decode. You can also upload a file using the File button.

2

Click Encode or Decode

Click Encode to convert text to Base64, or Decode to convert Base64 back to text. The tool automatically detects the operation.

3

Use AI Detect (optional)

Click AI Detect to analyze decoded Base64 content and identify what type of data it contains (JSON, XML, credentials, etc.).

4

Copy the result

Click Copy to copy the encoded or decoded output to your clipboard. Use it in your code, API requests, or configuration files.

Frequently Asked Questions

What is Base64 encoding?

Base64 is a binary-to-text encoding scheme that converts binary data into ASCII text format using 64 printable characters. It's commonly used to encode images, files, or binary data for transmission over text-based protocols like email, JSON APIs, or XML documents.

When should I use Base64 encoding?

Use Base64 when you need to transmit binary data through text-only channels, embed images in HTML/CSS using data URLs, store binary data in JSON or XML, send files via APIs that only accept text, or encode credentials for HTTP Basic Authentication. Note that Base64 increases data size by approximately 33%.

How do I decode a Base64 string?

Simply paste your Base64 string into the input field and click "Decode". The tool will automatically convert it back to the original text or binary data. If it's text, you'll see the readable content. If it's binary data (like an image), you'll see a representation of it.

Can I encode files to Base64?

Yes! Click the "File" button to select any file from your computer. The tool will read the file and encode it to Base64. This is useful for embedding images in CSS, creating data URIs, or transmitting files through text-based APIs.

Is my data safe when using this tool?

Absolutely. This tool runs entirely in your browser using JavaScript. Your data never leaves your device or gets uploaded to any server. All encoding and decoding happens locally on your computer, making it safe for sensitive data like API keys or credentials.

What does the AI Detect feature do?

The AI Detect feature analyzes decoded Base64 content and identifies what type of data it appears to be (e.g., JSON, XML, image data, credentials, JWT tokens, etc.). This is helpful when you receive Base64 data and aren't sure what it contains or how to use it.