Base64 Encoder

Simply place the string you would like to decode or encode using Base64 in the box below, or upload a file and hit decode or encode to get your result.

What is This Tool?

It's a free Base64 converter that will encode data into 4, 6-bit base64 digits. Or it will take your string that is already encoded and decode it to reveal the original data.

What Can I Use Base64 Encoded Data For?

There are many uses for Base64 encoded information, primarily it can be used to send media across platforms that are only designed handle textual data. One common example would be sending files by mail which are designed to be viewed by the recipient such as images. While Base64 encoded images are most commonly used, you can Base64 encode pretty much any file.

While Base64 makes data unreadable for a human, the data can easily be processed by a computer. It is therefore wise to make a clear distinction between encoded data and encrypted data. The Latter is secure while encoding absolutely does not obfuscate data in any way shape or form, as is simply demonstrated with the Base64 decoder above. If you are looking to secure data use an MD5 encryption key.

How Can I use my Base64 String?

Here are a couple of common ways to embed Base64 using HTML:

Base64 encoded image of Earth

HTML image embedding
<img src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAgEASABIAAD/7QMaUGhvdG9zaG9wIDMuMAA4QklNA+kAAAAAAHgAAwAAAEgASAAAAAAC2AIo/..." />
CSS image embedding
.imgClass {
background-image: 
url('data:image/jpeg;base64,/9j/4AAQSkZJRgABAgEASABIAAD/7QMaUGhvdG9zaG9wIDMuMAA4QklNA+kAAAAAAHgAAwAAAEgASAAAAAAC2AIo/...');
}
XML image embedding:
<xml>
<image>
data:image/jpeg;base64,/9j/4AAQSkZJRgABAgEASABIAAD/7QMaUGhvdG9zaG9wIDMuMAA4QklNA+kAAAAAAHgAAwAAAEgASAAAAAAC2AIo/...
</image>
</xml>
HTML CSS embedding
<link rel="stylesheet"
type="text/css" href="data:text/css;base64,/9j/YnV0dG9uLCBpbnB1dFt0eXBlPSJzdWJtaXQiXSB7DQoNCgkNCgljb2xvcjogI2VjZjBmM..." />
HTML JavaScript embedding
<script type="text/javascript" 
src="data:text/javascript;base64,/9j/YnV0dG9uLCBpbnB1dFt0eXBlPSJzdWJtaXQiXSB7DQoNCgkNCgljb2xvcjogI2VjZjBmM..."></script>