Byte array

A byte is 8 bits. A byte array is an array of bytes. You could use a byte array to store a collection of binary data, this data may be part of a data file, image file, compressed file, downloaded server response, or many other files. For large amounts of binary data, it would be better to use a streaming data type if your language supports it. With byte arrays, we have an ideal representation of this data. The byte array type allows you to store low-level representations. It is useful when optimizing certain methods.

byte array to string hexa

Hexadecimal string

Characters are represented as ASCII and they are 1 byte long, a byte could be represented with 2 digits in hexadecimal format for example 255 is 0xFF.

Convert a byte array to a hexadecimal string


If you want it without the dashes, just remove them:


Convert a String Hex to byte array


NEXT.....Catch multiple exceptions at once: C#