The same byte array can become four completely different strings. Here's how to convert bytes to text without garbling it.
"Convert this byte array to a string" is one of those tasks that looks trivial and then produces mojibake — those é and ’ garbage characters — because there's no such thing as "the" string for a set of bytes. A byte array is just numbers; turning it into readable text requires choosing an encoding. Here's how to get it right.
To convert instantly, paste your data into our bytes to string converter.
Take the bytes 72 101 108 108 111. Interpreted as:
ASCII / UTF-8 text → Hello
Hexadecimal → 48 65 6C 6C 6F
Base64 → SGVsbG8=
Decimal list → 72,101,108,108,111
All four are legitimate "string representations" of the same bytes. The first is the decoded text; the others are textual encodings of the raw bytes. Knowing which one your source produced is half the battle.
ASCII covers only the first 128 characters — plain English letters, digits, basic punctuation. Anything else (é, £, emoji, Cyrillic) needs a multi-byte encoding, and UTF-8 is the modern default. UTF-8 encodes é as two bytes (0xC3 0xA9). If you decode those two bytes as Latin-1 (one byte per character) instead of UTF-8, you get é — classic mojibake. The fix is almost always: decode with the same encoding the data was encoded with, and make that UTF-8 unless you have a specific reason not to.
Hex and Base64 don't try to show you readable text — they make arbitrary binary safe to store or transmit as text:
Hex is verbose (2 characters per byte) but human-inspectable — great for hashes, checksums, and debugging.
Base64 is compact (~1.33 characters per byte) — great for embedding binary in JSON, email, or URLs. It is not encryption; it's trivially reversible.
When your bytes represent numbers wider than one byte (16-, 32-, 64-bit integers), byte order matters. Little-endian stores the least-significant byte first; big-endian ("network byte order") stores the most-significant first. The same four bytes can mean two very different integers depending on endianness — a frequent source of bugs when reading binary file formats or network packets.
Identify what the source produced: decoded text, hex, Base64, or a decimal/comma list.
For text, confirm the encoding — default to UTF-8.
For numbers, confirm endianness.
Convert with the bytes to string converter, and if you're dealing with Base64 payloads, cross-check with the Base64 encoder / decoder.
There's no single "bytes to string" answer — there's a right encoding for your data. Pick UTF-8 for text, hex or Base64 for transport, mind your endianness for numbers, and the garbage characters disappear.
Creating helpful tools and sharing productivity insights to make your work easier.
Convert dates between DD/MM/YYYY, MM/DD/YYYY, YYYY-MM-DD, and 20+ other date formats. Free online date format converter with custom format support and one-click copy.
Send a WhatsApp message to any number without saving it to your contacts. Free, instant, no signup — perfect for businesses and one-off chats.
Convert between gold karats, purity percentage, touch, tunch, and 916/750/585/375 hallmark markings. Free online gold karat calculator and purity converter.
Generate custom QR codes for URLs, vCards, Wi-Fi, text, and more — high-resolution PNG and SVG download, free.
Convert byte arrays to strings online. Decode space- or comma-separated bytes (decimal, hex, or binary) to UTF-8 text. Free browser-based byte-to-string converter.