Skip to main content
Byte Array Tools

Byte Array to File Converter

Rebuild a file from a byte array. Paste decimal, hex or Base64 bytes, see the detected file type, and download the file straight from your browser.

Paste the bytes from a log, a debugger or an API response to rebuild the original file and see what type it is before you open it.

Decimal, hex, binary, Base64 or a code array (C, Java, Python, JavaScript, Go, Rust...).

The file is built and downloaded by your browser - nothing is uploaded.

Only open rebuilt files you trust - the tool identifies the type, but it cannot tell whether a file is safe.

What Is the Byte Array to File Converter?

It rebuilds a file from bytes you paste - decimal values, hex, Base64 or an array from source code - identifies what kind of file it is from its signature, and lets you download it. The file is assembled in your browser; nothing is uploaded.

When to Use It

  • An API or a log returned a file as a byte array or Base64 string and you want to see it.
  • You extracted bytes in a debugger and need to save them to disk.
  • You want to check what type of file a blob of bytes is before opening it.

How to Use It

  1. Paste the bytes and choose the input format, or leave it on automatic detection.
  2. Click Check Bytes to see the size, the detected file type and the first bytes.
  3. Adjust the file name if needed and click Download File.

Example

The Base64 string iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+A8AAQUBAScY42YAAAAASUVORK5CYII= decodes to 68 bytes. The tool detects a PNG image (image/png) from the first bytes 89 50 4E 47 0D 0A 1A 0A and suggests the name bytes.png.

Understanding the Output

The detected type comes from the file's "magic number" - fixed bytes at the start that most formats use. The suggested extension follows it; if the type is unknown, the file is saved as .bin. The download contains exactly the bytes you pasted, nothing added.

Limitations

The tool identifies the format but cannot tell whether a file is safe. Do not open executables or documents from sources you do not trust. Text formats such as CSV or JSON have no signature, so they are recognised only roughly. To create an array from a file, use File to Byte Array; for images in Base64 you can also use Base64 to Image.

Frequently Asked Questions

It checks the first bytes against a list of known file signatures (magic numbers). For example, PNG files start with 89 50 4E 47 and PDF files with 25 50 44 46 (%PDF). The suggested file extension follows the detected type.

Yes. The download contains exactly the bytes you pasted, with nothing added or removed. If the result does not open, the bytes themselves are incomplete or damaged - compare them with the original using Byte Array Compare.

Only if you trust where the bytes came from. The tool identifies the file format but cannot tell whether a file is harmful. Treat executables, scripts and Office documents from unknown sources with care.

Yes. Choose Base64 as the input format and paste the whole value - the data:...;base64, prefix is removed automatically.
Share this tool: