Base64 Decode Text, Binary and Data URLs
Decode text or data URL images. Type or paste a Base64 ASCII string into the source text box or alternatively browse or drag and drop a file to Base64 decode online.
About The Tool
The tool will convert a base64 string back to the original text or binary data. The decoding function is a JavaScript base64 decoder that does all decoding locally in the browser. Nothing is stored or transferred to the server.
The tool can also Base64 decode images from a data URL format. It will extract the image and display the result in the results box. A source file that contains Base64 text can be selected or dragged and dropped from the desktop and the contents will be loaded into the source box for decoding.
The tool was designed to be simple to use, safe and secure with 2048 bit SSL encryption, and completely free. If you find this tool or others that we provide helpful, please take a moment to share it with your friends and coworkers or follow us using the social links at the bottom of this page.
Decoding Text And Binary Data
The Base64 variant supported is the MIME content transfer encoding outline by RFC4648. A few other variants use different ASCII characters for the 62nd and 63rd in place of '+' and '/'. These variants are not supported. For more details on the inner workings of the Base64 encoding scheme see What Is Base64.
Upon successfully decoding of a source string, the results will be displayed in the results box. If the original data was binary, the results may not be readable text. When the results are saved to a file, the file will contain the original byte stream encoded by the source.
Decoding Images
The Base64 image decoder accepts data URLs from CSS or inline <img> tags from an HTML document following the RFC2397 specification. Please remove the <img> tag or the url() surrounding the data URL to ensure the tool can decode it correctly.
The data URL Format follows this pattern:
data:[<mediatype>][;base64],<data>
Here is an example data URL the tool will decode:
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAByCAYAAACx1Ch2AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH4gsBBwYm2SxyowAAA/1JREFUeNrt3U9oHFUAgPFvN7s2xQSK4r+i2GhBPVitf+jFIHoTTypCBS9jrt6EUkF8Ha0e1HO9WJ7Ug1hQL+JBBKX2IFWIxoOgxFqKCsUoJY0lmiYeZpYuaZPdjZvsc/L9YFnaZpO3L19mZl93JiBJkiRJkiRJkiRJkiRJkiRJkiRJkjaL2qZ7xlkOMSz/uy1A63YF0AQa5f0IsLX8M8ACcB44B/xT3haAv4F5YJ4Y5jt+TcOqYExZPgw8BjwO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LxkjtSDiQPOgSRJkiRJkiRJkiRJkiRJkiRJkiRJ/fMvMpfX4wVdDlYAAAAASUVORK5CYII=
Common Uses Of Base64
In the early days of the Internet, ASCII was the standard encoding for text. It uses 7 bits to represent a character of text. It was able to represent the most common printable characters as well as a handful of control characters. A number of applications including SMTP base email systems were designed to work only with textual data. These systems are not "8 bit clean", in other words, characters that are not alphanumeric such as carriage returns and line feeds may get mangled. If these byte values are in an executable or image, then the resulting payload will have a different meaning downstream causing the image or executable to become corrupted. Base64 allows a system to represent binary data in an ASCII format, such as mail attachments, using only 64 characters without the risk of data corruption.
Today many more scenarios need to encode binary data use Base64. A few examples include:
Hashes and Checksums
They are one way functions that change a stream of bytes into a different fixed sized stream of bytes. A few common hashing functions include SHA and MD5. Converting the hash into Base64 makes it easier to compare the checksum hash for integrity.
Encryption
Many encryption algorithms use secret keys that can be any sequence of bytes, not just text. It's often easier to store the keys in a config file or database in Base64. The same is true with the ciphertext output of the encryption algorithm.
Certificates
x509 certificates, like the ones used to secure websites with SSL over https are often stored as Base64.