Base64 Forge

Encode & Decode Base64 Instantly

Convert text to Base64 and back. Upload files to generate Base64 Data URIs. 100% free and private.

File to Base64

Upload any file to convert it to a Base64 Data URI. Useful for embedding images in HTML/CSS.

Learn More

Base64 is a binary-to-text encoding scheme that represents binary data using a set of 64 printable ASCII characters (A-Z, a-z, 0-9, +, /). It was designed to safely transmit binary data through text-based protocols like email (MIME) and HTTP. The encoding process takes every 3 bytes of input and converts them into 4 Base64 characters, resulting in approximately 33% size increase. Base64 is not encryption — it's a reversible encoding that provides no security. It's used to embed binary content (images, files) directly in text formats like HTML, CSS, JSON, and XML.

Developers frequently use Base64 for data URIs that embed small images directly in HTML or CSS, eliminating additional HTTP requests. It's essential for encoding file attachments in email (MIME), transmitting binary data in JSON APIs, and storing binary content in text-based databases or configuration files. Base64 is also used in authentication headers (HTTP Basic Auth), JWT tokens, and data transfer between systems with different character encoding requirements.

Only embed small assets (under 10KB) as Base64 data URIs — larger files are better served as separate requests due to the 33% size overhead and inability to be cached independently. Use URL-safe Base64 (replacing + with - and / with _) for data that appears in URLs or filenames. When decoding Base64 from untrusted sources, always validate the output before processing. For large files, consider streaming encoding/decoding to avoid memory issues.

How to Encode & Decode Base64

1

1. Choose Mode

Select Encode or Decode mode. Use Encode to convert text to Base64, or Decode to convert Base64 back to readable text.

2

2. Enter Your Data

Type or paste your text/Base64 string. The conversion happens in real-time as you type. Toggle URL-safe mode for URL-friendly output.

3

3. Copy the Result

Copy the output with one click. For files, use the File to Base64 section to get a complete Data URI ready for HTML or CSS.

Frequently Asked Questions

Is this Base64 encoder free?

Yes, 100% free with no limits. Encode and decode as much as you need without registration.

What is Base64 encoding?

Base64 is a binary-to-text encoding scheme that converts data into ASCII characters. It's used to embed images in HTML, send data in APIs/emails, and handle binary data in text-only environments.

Is my data safe?

Absolutely. Everything runs in your browser using JavaScript's built-in btoa/atob. No data is sent to any server.

Can I convert files to Base64?

Yes! Upload any file to get its Base64 Data URI. This is perfect for embedding images directly in HTML or CSS.

Explore More Tools