Convert Base64 to pdf

Simply enter your data then click on the decode button

Select the extension of the file :
  • .aac
  • .abw
  • .arc
  • .avi
  • .azw
  • .bin
  • .bmp
  • .bz
  • .bz2
  • .csh
  • .css
  • .csv
  • .doc
  • .docx
  • .epub
  • .gz
  • .gif
  • .htm
  • .ico
  • .ics
  • .jar
  • .jpeg
  • .jpg
  • .js
  • .json
  • .jsonld
  • .mid
  • .midi
  • .mjs
  • .mp3
  • .mp4
  • .mpeg
  • .mpkg
  • .odp
  • .ods
  • .odt
  • .oga
  • .ogv
  • .ogx
  • .opus
  • .otf
  • .png
  • .pdf
  • .jpeg
  • .jpg
  • .pdf
  • .php
  • .ppt
  • .pptx
  • .rar
  • .rtf
  • .sh
  • .svg
  • .swf
  • .tar
  • .tif
  • .tiff
  • .ts
  • .ttf
  • .txt
  • .vsd
  • .wav
  • .weba
  • .webp
  • .woff
  • .woff2
  • .xhtml
  • .xls
  • .xlsx
  • .xml
  • .xul
  • .zip
  • .3g2
  • .7z

Please, find here the result of the decoded base64

Encode to Base64 format

How to use our tool to base64 decode ?

Decode Base64 is a tool that enables you to base64 decode and encode.

The tool is simple and enables you to convert base64 to text or any type of file.

Here the most common file usecase :

To use this tool, you just need to copy paste your encoded data in the field and then select the output type needed. You have the choice between text or file.

If you want to convert the encoded data to a file, you need to select the file extension.

Then you just need to click on the button decode or decode and download in case of conversion to a file.

What is base64 ? How to base64 decode and encode ?

Base64 is a 64-character information encoding used in computing that was chosen because it is typically supported by most platforms. It is mostly used for the transmission of communications via the Internet and is defined as a MIME encoding.

For example, base64 is commonly used to share files as a text in REST APIs

65 character are used to enable representation of 6 bits per character.

Each group of 24 successive bits of data is encoded using a string of four characters in this encoding procedure. From start to finish, we concatenate three bytes to produce a single 24-bit chunk which means 8 bits per byte. They are then divided into 4 numbers with just 6 bits each. Finally, a character from the chosen alphabet serves as a representation for each of the four values.

As a result, any 3 bytes are replaced with 4 characters, which are chosen to work with all current platforms.

If there are fewer than 24 bits left at the end of the data sequence that needs to be coded, special processing is carried out (it does not necessarily have a size multiple of 24 bits). To get to the closest multiple of 6 bits in this situation, zeros are added to the right of the initial data. The alphabet is created from each 6-bit packet. Then, more "=" characters are added to create a total of 4 characters.

There are only three potential scenarios at the conclusion of the sequence since the input data must consist of an integer amount of bytes.

The exact last 3 bytes to be coded are then received, followed by the immediate acquisition of 4 characters. Only 2 bytes remain to be coded, so we add 2 bits to the right with zeros to create the remaining 3 alphabetic characters (3x6 = 16+2 = 18 bits), then we add the additional character "=". Only one byte remains to be encoded, therefore 4 bits with zeros are added to the right to create 2 alphabet letters, which are then followed by two more "=" characters.


The size of the data is increased by at least one third as a result of this encoding. The size is further inflated by "whitespace" characters like spaces, tabs, and newlines.

Even understandable characters in the original data are rendered unintelligible by this encoding. It is possible to only encode the troublesome characters in an initial text if the rest of the characters are already readable.


The interest of the base64 encoding is therefore not in the representation of textual data, but especially in the representation of binary data.

The hexadecimal transcription in ASCII of the bytes would increase the size by two when we want to represent binary data (an image, an executable) in a textual message, such as an email. The base64 encoding allows us to reduce this increase.

Furthermore, the criticism of the data's readability is invalid under these circumstances because binary data are not meant to be understood without the aid of specialized software.

Example to convert base64 to pdf with Javascript

You can find here a simple Javascript function that enables you to decode base64 format to pdf file.

// Convert base64 to pdf with Javascript

function decodeBase64ToPdf(encodedString) {

    consturl = `data:application/pdf;base64,${encodedString}`;

    fetch(url).then(res => res.blob())

        .then(blob => {

            return new File([blob], "Filename.pdf", { type: "application/pdf" })



Example to convert base64 to pdf with Java

Here is a straightforward Java static function that allows you to convert base64 to pdf.

// Convert base64 to pdf with Java

public static void decodeBase64ToPdf(String base64String) throwsIOException {

    byte[] decodedBytes = Base64.getDecoder().decode(base64String);

    Files.write(Paths.get("D:\\path\\file.pdf"), decodedBytes);


Select language