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.
72, 101), hex (48 65, 0x48, \x48), binary or a code array such as byte[] b = {...} or bytes([...]).More Byte Array Tools
View all 17If 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
- Paste the bytes. Array syntax, brackets, commas and casts are stripped automatically.
- Leave the input format on Detect automatically, or pick decimal, hex, binary or Base64 when the input is ambiguous.
- 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
Explore More Tools
Keep going with related categories and our most used tools.