b2KIT

Text to Binary File Converter

Convert hex dumps and binary strings to downloadable binary files and view binary files as hex dumps.

Tested tool guide Tested browser tools Checked August 16, 2026

What Text to Binary File Converter does, with a checked example

This converter treats hex as a byte-for-byte spec: each pair of digits you paste becomes exactly one byte of the file it offers for download, and the same page runs the reverse, rendering an uploaded file's bytes as a hex dump. The surprise most users hit: what you paste must be pure byte values. Dumps copied from xxd carry offset and ASCII columns that are not bytes, and pasting them wholesale either fails or mangles the output. Everything happens locally in the browser; nothing is uploaded.

Worked example

A concrete input and expected output from the current implementation.

Input

48656C6C6F

Expected output

A 5-byte file containing the bytes 48 65 6C 6C 6F, which is the ASCII text 'Hello'.

Each pair of hex digits becomes one byte: 0x48 is the ASCII code for 'H', 0x65 for 'e', 0x6C for 'l', and 0x6F for 'o', so the five bytes spell 'Hello'.

How the result is produced

1

Parsing text into bytes

Whitespace is ignored, so 48 65 6C 6C 6F, 48656C6C6F, and newline-separated columns parse to the same five bytes: each hex pair from 00 to FF becomes exactly one byte. A binary-digit input style is also accepted, where each group of eight 0s and 1s becomes one byte, so 01001000 means the same 0x48 as before. Anything outside 0-9, a-f, or 0-1 cannot form a byte, so a paste that came from a formatted dump needs proofreading.

2

Reading a file as a hex dump

Upload a file and the tool lays out its bytes in the usual dump format: an offset column, the hex byte values in order, and an ASCII rendering beside them, where 41 shows as 'A' and non-printable values show as a placeholder. The byte column is written in exactly the form the text side accepts, so a dump can be reused to reproduce the file, provided the offset and ASCII columns are stripped first.

Good uses

  • Recreate a file from hex you already have: bytes of a damaged file recovered from a log or database, or a small binary you must regenerate exactly. The converter needs nothing but the pasted text, so it works on any machine with a browser.
  • Build test fixtures with exact bytes: a header of magic numbers such as FF D8 FF for JPEG, or a few opcode bytes, to verify that your parser reads them as expected.
  • Identify a file that will not open: upload it and read the first bytes. Format markers such as 89 50 4E 47 for PNG or 25 50 44 46 ('%PDF') for PDF confirm what the file really is.

Limits and checks

  • A formatted dump is not input. The offset and ASCII columns of an xxd-style listing are not bytes, and the ASCII column contains letters such as 'a' to 'f' that are valid hex digits, so pasting a full dump can silently yield different bytes than the original file. Strip down to the byte pairs first.
  • A hash is not a file. A SHA-256 digest is 64 hex digits, but it converts to a 32-byte file of digest bytes, not to the file it was hashed from; hashing is one-way and no converter can reverse it. Check whether the hex you have describes bytes you actually want.
  • Verify size before downloading. Every two hex digits are one byte, so the download's length equals half your digit count, and a paste with an odd number of digits cannot form whole bytes. Compare that length against the size you expect, since a single missing pair changes everything downstream.

Common questions

Why does the downloaded file show up as garbage in a text editor?

Because it is a binary file, and most byte values have no printable character. If you meant to produce a text file, the hex you pasted does not encode the text you wanted: 48656C6C6F is the bytes of 'Hello', not the word 'Hello'. Open the download with a hex viewer or the program that expects those bytes instead. Everything runs locally in your browser, so the file never leaves your machine.

Can I convert a text file into binary?

There is no non-binary file to convert: every file on disk is already a sequence of bytes. This tool only changes representation, turning hex text into the raw bytes it describes and byte-for-byte back again. It does not base64-encode, compress, or alter character encoding, so feed it hex digits, not words, and you get a file.

References and verification

The example and behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools