AI Tools Free

Byte Array to String Converter

Paste a hex, decimal, or binary byte array into the Byte Array to String Converter below to decode it into a UTF-8 string (or switch directions to encode text into hex, decimal, and binary byte arrays).

Free to useNo sign-upRuns in your browser
Enter your details

Enter the inputs, then select Convert Bytes / Text.

Choose whether to decode a byte sequence or encode text into bytes.

Base used for parsing input bytes (or formatting primary output when encoding).

Supports space, comma, bracketed JSON array [..], or continuous hex strings.

Control whether malformed UTF-8 continuation bytes throw an error or use U+FFFD.

Your result
Enter your details

Result will appear here

How Byte Array to String Converter works

The Byte Array to String Converter tokenizes your input according to the selected base (16, 10, or 2), validates that every value lies within 0..255, constructs a Uint8Array, and decodes the buffer using RFC 3629 UTF-8 rules.

0 <= byte <= 255 (0x00..0xFF); UTF-8 multi-byte sequences use 1 to 4 bytes per Unicode scalar value.

If a multi-byte UTF-8 sequence is truncated or contains an illegal continuation byte, Strict mode pinpoints the exact 0-based byte offset.

Byte Array to String Converter workflow overview
Workflow overview for Byte Array to String Converter.

Byte Array to String Converter Quick Reference & Input Guide

Review the input parameters, allowed value ranges, and worked reference cases for the Byte Array to String Converter below before running your calculation.

Parameter / ScenarioDefault / Sample ValueRule or Allowed RangeOutput / Usage Note
Input: Conversion directionbytes_to_stringOptions: Byte Array -> UTF-8 String (Decode), UTF-8 String -> Byte Array (Encode)Required workspace parameter
Input: Byte representation formathexOptions: Hexadecimal bytes (e.g. 48 65 6C 6C 6F or 0x48, 0x65), Decimal byte array (e.g. [72, 101, 108, 108, 111]), 8-bit binary bytes (e.g. 01001000 01100101)Required workspace parameter
Input: Input bytes or UTF-8 string48 65 6C 6C 6F 2C 20 55 54 46 2D ...Supports space, comma, bracketed JSON array [..], or continuous hex strings.Required workspace parameter
Input: UTF-8 decoding policystrictOptions: Strict UTF-8 (report exact byte index on invalid sequence), Permissive (replace invalid bytes with U+FFFD )Required workspace parameter
Worked Case 1: Default 13-byte hex array ('48 65 6C 6C 6F 2C 20 55 54 46 2D 38 21')Preloaded / test valuesUint8Array([b_0, ..., b_{n-1}]) <-> TextDecoder('utf-8', { fatal: strict }).decode(bytes)Decoding the 13 hex bytes [0x48..0x21] (decimal [72, 101, 108, 108, 111, 44, 32, 85, 84, 70, 45, 56, 33]) outputs 'Hello, UTF-8!' (13 bytes, 13 Unicode code points).
Worked Case 2: Decoding a JSON decimal byte array with multi-byte UTF-8Preloaded / test valuesUint8Array([b_0, ..., b_{n-1}]) <-> TextDecoder('utf-8', { fatal: strict }).decode(bytes)Switching to Decimal mode and pasting '[226, 130, 172, 49, 48, 48]' decodes the 3-byte Euro sign (E2 82 AC) followed by '100' into '€100' (6 bytes, 4 characters).

How to use Byte Array to String Converter step by step

Inspect network packet payloads, Rust/Go byte slices, or WebCrypto buffers right in your browser.

Select Decode or Encode direction

Pick 'Byte Array -> UTF-8 String' to decode bytes, or 'UTF-8 String -> Byte Array' to encode text.

Byte Array to String Converter step 1: Select Decode or Encode direction
Step 1 workflow overview for Byte Array to String Converter.

Choose Hexadecimal, Decimal, or Binary format

Select whether your byte array is formatted in Hexadecimal (base 16), Decimal (base 10), or 8-bit Binary (base 2).

Byte Array to String Converter step 2: Choose Hexadecimal, Decimal, or Binary format
Step 2 workflow overview for Byte Array to String Converter.

Convert and inspect UTF-8 text and byte representations

Click Convert Bytes / Text to view the decoded string, byte length, Unicode character count, and all three base representations.

Byte Array to String Converter step 3: Convert and inspect UTF-8 text and byte representations
Step 3 workflow overview for Byte Array to String Converter.

Worked examples for Byte Array to String Converter

See how ASCII and multi-byte UTF-8 byte arrays decode and validate.

Default 13-byte hex array ('48 65 6C 6C 6F 2C 20 55 54 46 2D 38 21')

Decoding the 13 hex bytes [0x48..0x21] (decimal [72, 101, 108, 108, 111, 44, 32, 85, 84, 70, 45, 56, 33]) outputs 'Hello, UTF-8!' (13 bytes, 13 Unicode code points).

Byte Array to String Converter example 1: Default 13-byte hex array ('48 65 6C 6C 6F 2C 20 55 54 46 2D 38 21')
Worked example 1 for Byte Array to String Converter.

Decoding a JSON decimal byte array with multi-byte UTF-8

Switching to Decimal mode and pasting '[226, 130, 172, 49, 48, 48]' decodes the 3-byte Euro sign (E2 82 AC) followed by '100' into '€100' (6 bytes, 4 characters).

Byte Array to String Converter example 2: Decoding a JSON decimal byte array with multi-byte UTF-8
Worked example 2 for Byte Array to String Converter.

Catching an invalid UTF-8 byte in Strict mode

Pasting '48 65 FF 6C' in Strict mode immediately reports an invalid UTF-8 byte 0xFF at byte index 2, whereas Permissive mode outputs 'Hel'.

Byte Array to String Converter example 3: Catching an invalid UTF-8 byte in Strict mode
Worked example 3 for Byte Array to String Converter.

How to interpret the Byte Array to String Converter output

Check both the byte count and the decoded character count when working with non-ASCII strings.

The primary result shows the decoded UTF-8 string (or encoded byte sequence). The breakdown cards show Total byte length, Decoded character (code point) count, Printable ASCII ratio, and simultaneous Hex, Decimal JSON array, and Binary representations.

How to interpret Byte Array to String Converter results
Result interpretation guide for Byte Array to String Converter.

Input limits, assumptions, and related tools

Note unsigned vs. signed byte conventions across programming languages.

This converter expects unsigned 8-bit integers (0 to 255). If you are copying a signed Java byte[] array containing negative numbers (e.g., -30 instead of 226), add 256 to negative values before decoding.

Scope limits and assumptions for Byte Array to String Converter
Assumptions and input boundaries for Byte Array to String Converter.

Byte Array to String Converter: common questions

Answers about using Byte Array to String Converter and understanding its results.

What byte array formats can I paste into the Byte Array to String Converter?

In Hex mode, you can paste spaced bytes ('48 65 6C'), comma-separated 0x literals ('0x48, 0x65'), or continuous hex ('48656c'). In Decimal mode, you can paste JSON/JavaScript arrays like '[72, 101, 108, 108, 111]' or space-separated integers 0 to 255.

How does Strict UTF-8 mode locate invalid byte sequences?

When TextDecoder('utf-8', { fatal: true }) rejects a byte array, the converter scans the Uint8Array byte by byte using RFC 3629 UTF-8 state rules to report the exact 0-based index and hex value of the first invalid byte.

Can I convert a UTF-8 string into a JSON decimal byte array and C/Go hex literal?

Yes. Switch Conversion direction to 'UTF-8 String -> Byte Array (Encode)' and the export box outputs spaced hex, a JSON decimal array [b0, b1, ...], and 8-bit binary side by side.

What is the valid range for each element in a decimal byte array?

Every unsigned byte must be an integer between 0 and 255 (0x00 to 0xFF). If a signed byte (such as -16 from Java) or a value > 255 is entered, the validator flags the out-of-range token.

Try your own values

Choose another tool for your next calculation, conversion, or text task.

Convert Bytes / Text