Skip to main content
Byte Array Tools

Byte Array to String Converter

Turn a byte array back into readable text. Paste decimal, hex, binary or Base64 values, or an array from Java, C, Python or JavaScript, and choose the encoding.

Paste bytes in almost any notation and read them as text - invalid sequences are flagged instead of silently dropped.

Paste decimal (72, 101), hex (48 65, 0x48, \x48), binary or a code array such as byte[] b = {...} or bytes([...]).

If the result is full of replacement characters, the data is probably not text in that encoding - try another one, or check the bytes with the File Signature Checker.

What Is the Byte Array to String Converter?

It turns a list of bytes back into text. You can paste the bytes almost any way you find them - decimal values, hex with or without spaces, 0x or \x prefixes, binary, Base64, or a whole array declaration copied from Java, C, Python, JavaScript, Go or Rust source code - and choose the encoding to decode them with.

When to Use It

  • Reading a byte array printed in a log, a debugger or a unit test failure.
  • Checking what text is hidden in a network packet, a binary file header or a database BLOB.
  • Finding out whether a mangled string is a UTF-8 versus Latin-1 mix-up.

How to Use It

  1. Paste the bytes. Array syntax, brackets, commas and casts are stripped automatically.
  2. Leave the input format on Detect automatically, or pick decimal, hex, binary or Base64 when the input is ambiguous.
  3. Choose the text encoding and read the result.

Example

Pasting the Java line byte[] msg = { 0x43, 0x61, 0x66, (byte) 0xC3, (byte) 0xA9, 0x20, (byte) 0xE2, (byte) 0x82, (byte) 0xAC, 0x35 }; gives the text Café €5: the two bytes C3 A9 are "é" and the three bytes E2 82 AC are the euro sign in UTF-8.

Understanding the Output

The status line shows how many bytes were read and how the input was interpreted. If some bytes are not valid in the chosen encoding, they appear as � and a warning tells you how many - a sign that the data is in a different encoding, or is not text at all.

Limitations

Short inputs can be ambiguous: 12 34 is read as two hex bytes, while 12, 34 with commas is read as decimal. Pick the format yourself when it matters. Binary data such as images decodes into meaningless characters - use the File Signature Checker to find out what it is, or the Hex Viewer to inspect it.

Frequently Asked Questions

Decimal values (72, 101), signed values (-61), hex with or without separators (48 65, 4865, 0x48, \x48), binary (01001000), Base64, and whole array declarations from Java, C, C#, Python, JavaScript, Go, Rust and Kotlin. Brackets, casts and variable names are stripped automatically.

The bytes are not valid in the encoding you chose. Try another encoding - Latin-1 can decode any byte - or check whether the data is really text. Images, compressed data and encrypted data always decode to meaningless characters.

Short inputs are ambiguous. Two-digit values separated only by spaces, such as 12 34, look like hex bytes. Add commas or choose Decimal in the Input format list to read them as decimal numbers.

Yes. Values from -128 to -1 are treated as signed bytes and converted to their unsigned equivalent (for example -61 becomes 195, which is 0xC3), exactly as Java stores them.
Share this tool: