Base64 Encoder/Decoder

Encode text to Base64 or decode Base64 to text. Also supports file encoding and decoding. All processing is done locally in your browser.


Image Preview

No image selected

How to Use the Base64 Encoder/Decoder

Text Mode
  1. Enter text in the input field.
  2. Click "Encode" to convert text to Base64.
  3. Or, paste Base64 text and click "Decode" to convert it back to regular text.
  4. Use the "URL-safe" option if you need Base64 that works in URLs.
File Mode
  1. Select a file using the file input.
  2. Click "Encode File to Base64" to convert the file to Base64.
  3. To decode, paste Base64 data in the input field, specify a filename, and click "Decode to File".
Image Mode
  1. Select an image using the file input.
  2. Click "Encode Image to Base64" to convert the image.
  3. View the image preview and copy the Base64 string, HTML tag, or CSS code as needed.

About Base64 Encoding

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 that needs to be stored and transferred over media that are designed to deal with text.

Common Uses of Base64
  • Email Attachments: MIME format uses Base64 to encode binary attachments.
  • Data URLs: Embedding images directly in HTML or CSS using the data: URI scheme.
  • API Communication: Sending binary data in JSON payloads.
  • Storing Binary Data: In databases or other systems that primarily handle text.
  • Avoiding Special Character Issues: When transferring data that might contain characters that could be misinterpreted.
Base64 Characteristics
  • Base64 encoded data is approximately 33% larger than the original binary data.
  • Standard Base64 uses characters A-Z, a-z, 0-9, +, and / with = as padding.
  • URL-safe Base64 replaces + with - and / with _ to avoid URL encoding issues.
  • Base64 encoding is not encryption and does not provide any security.
All encoding and decoding is performed locally in your browser. Your data is never sent to any server, ensuring your privacy and security.