Toolvito

Works on this device

Binary Blob to Hex

Type or paste bytes as text, Base64, hex or numbers, and get them as hex in the form you need. You can also read hex back into bytes. Nothing is sent anywhere.

Your data

Type or paste here. It is converted on this device and is not sent anywhere.

Enter 0 to write everything on one line. A hex dump always has 16 bytes on a line.

Your values are worked out in this browser. They are not sent to a server.

Your result will show here

Enter your data, or choose Try an example.

How to use this tool

  1. Type or paste your data, or open a text file from your device.
  2. Say what the data is: text, Base64, hex, or numbers from 0 to 255.
  3. Choose the form of the hex and how many bytes go on one line.
  4. Choose Copy hex or Download hex to keep the result.
  5. To go the other way, choose Hex back to bytes in the menu and paste the hex.

The forms of hex

The bytes of the text Hello in each form
Form Result
Plain 48656c6c6f
With spaces 48 65 6c 6c 6f
0x list 0x48, 0x65, 0x6c, 0x6c, 0x6f
C array unsigned char data[] = { 0x48, 0x65, 0x6c, 0x6c, 0x6f }; and a second line with the length
\x string \x48\x65\x6c\x6c\x6f
Hex dump An offset, 16 bytes in two groups of eight, and the bytes as text

One byte is a number from 0 to 255 and is written as two hex digits, from 00 to ff. The digits a to f can be written as small or capital letters.

A hex dump line starts with the place of its first byte in the data, counted from zero and written in hex. The text column shows a dot for every byte that is not a printable ASCII character. The last line of the dump is the total length.

Reading hex back

  • Hex digits are read in pairs. A byte may have 0x or \x in front of it.
  • Spaces, line breaks, commas, semicolons, colons, hyphens and brackets between bytes are left out.
  • After 0x, one digit alone is one byte, so 0x5 is the byte 05. A longer run must have an even number of digits.
  • Any other character is an error, and the tool names its position. Words such as a variable name must be removed first, because letters such as d and a are also hex digits.
  • A hex dump is read with its own choice in the menu: the offset column and the text column are left out.

Worked example

The text Hello World! with a line break at its end is 13 bytes. As a hex dump it is one line of data, 00000000 48 65 6c 6c 6f 20 57 6f 72 6c 64 21 0a |Hello World!.|, and the length line 0000000d. The line break is the byte 0a and shows as a dot in the text column.

The hex 48 65 6c 6c 6f read back as text is Hello. As Base64 it is SGVsbG8=, and as numbers it is 72, 101, 108, 108, 111.

Limits you should know

  • This page opens text files only. It cannot open a picture, a program or another file that is not text, and it saves results as text files. To move such bytes, turn them into Base64 with another program first and paste the Base64 here.
  • At most 100,000 bytes are handled at a time.
  • Text is read as UTF-8. A file saved in another encoding gives other bytes.
  • Bytes can be shown as text only when they are valid UTF-8 without control characters. In other cases choose Base64 or numbers.
  • The page shows the first 500 lines of a hex dump as a table. The text box and the downloaded file have every line.
  • Hex is not a way to hide data. Anyone can read it back.

Related tools