Encode or decode text and files with Base64

This free online tool allows you to encode or decode text and files into Base64 format.
It supports not only text input but also image file conversion, with compatibility for UTF-8 and EUC-KR Korean encodings.

Base64 is a widely used encoding method for representing binary data in text form.
It is commonly used in email attachments, data URIs, image encoding, and more.

By converting an image file to Base64, you can embed the image directly into an HTML IMG tag without needing an external file.
This is especially useful for web development or when embedding data inline.

Encoding results:

Decoding results:

Download Encoded Files:

Download Decoded Files:

Have questions?
Find answers here.

Base64 encoding is a method that converts binary data (such as images, files, encrypted values, etc.) into a safe text format made up of only letters, numbers, and symbols.
This approach is widely used whenever you need to store or transmit binary data as text—such as with email (MIME), XML, JSON, web APIs, cookies, and data URIs.

Base64 encoding prevents data corruption or tampering during transmission, making it essential for file uploads, API integration, handling complex strings, images, audio, attachments, and more.
However, keep in mind that encoded data increases in size by about 33%, so it’s best to consider efficiency when handling large files.

<p> If you get an empty result when encoding or decoding with Base64, the selected charset may not match the format of your data.<br/> For example, if you use the wrong charset—such as UTF-8, EUC-KR, or Shift-JIS—Korean, Japanese, emoji, or special characters may not be converted correctly. </p> <p> Check that you have selected the correct charset, or try switching between different charsets.<br/> If there’s still no result, make sure there are no unnecessary spaces or special characters in your input.<br/> For complex files or binary data, using the file upload option may help you get more reliable results. </p>

Base64 encoding has become a standard for safely converting binary data into text, widely used today in file uploads, email, the web, APIs, and more.
Its origins trace back to a time when computers used a variety of byte (bit) sizes—8-bit, 7-bit, 6-bit, even 3-bit bytes—leading to confusion and frequent data loss or transmission errors between different systems.

In the early days, email servers could transmit only text data, and not images, videos, or compressed files, so engineers needed a way to send all types of data using text only.
This led to the development of various encoding schemes for safely converting binary data to text, and among them, Base64 gained popularity as a standard thanks to its simplicity, efficiency, and portability.

Base64 was first officially described in the 1987 PEM (Privacy Enhanced Mail) protocol document.
Since then, it has been widely adopted for email (MIME), the web, file attachments, data URIs, APIs, and more, becoming the leading standard for binary-to-text conversion in modern IT.

Base64 encoding makes it possible to safely transmit, store, or represent binary data—such as images, audio, or documents—even in environments where only text is allowed.
It is widely used in various fields, including HTML, CSS, email, APIs, and databases.

Typical use cases for Base64 include:
- Sending images or file attachments in emails by converting them to text.
- Embedding images directly into HTML or CSS using data URI schemes.
- Safely storing or transmitting raw bytes from encryption or hashing operations.
- Returning binary data in text formats such as JSON or XML in API responses.
- Storing binary files as text in a database when BLOB is not available.

Base64 helps reduce risks related to data loss, character encoding issues, and portability during transmission, making it a vital tool in web development, backend processing, data handling, file management, and more.

Base64 is an encoding method, not an encryption or hashing algorithm.
Data encoded in Base64 can easily be reverted to its original form by anyone, so using it to protect passwords, personal information, or sensitive data poses a serious risk of data leakage and security breaches.

Base64 is just a “representation” for transmitting or storing data, and is completely different from secure transformation like encryption.
Encryption is a technique that cannot be reversed without a specific key, and hashing is a one-way transformation that cannot be restored at all.
In contrast, Base64 can always be decoded, so it should never be relied upon for security.

In practice, Base64 should only be used for encoding the output (raw bytes) of encryption or hash functions for textual transmission, and sensitive data itself should never be encoded directly in Base64.
Remember: Base64 is simply a “character code conversion” method and does not provide any information protection.

Base64 encoding safely converts binary data into text, but since the data is split into 6-bit chunks and reassembled using letters, numbers, and symbols, the resulting file is about 33% larger than the original.
For example, if you convert a 1MB (1024KB) image to Base64, it becomes approximately 1.33MB.
So, when storing or transmitting large files on the web, through APIs, or in databases, keep in mind the additional storage space and network bandwidth required.

Base64 is very useful for sending or storing binary data in text-based systems or restricted environments, but overuse can lead to performance issues or excessive storage usage.
If possible, consider using binary file transfers (such as BLOB) or file attachments instead.