Bytes to String Converter

Decodes space-separated decimal byte values (0-255) as UTF-8 back into text, the reverse of Convert a String to Bytes, with strict validation that the bytes form valid UTF-8. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-22

Overview

Introduction

Decoding a raw byte sequence back into text, from a network capture, a debugger, or a low-level encoding exercise, needs a UTF-8-aware decoder.

This tool does that with strict validation.

What Is Bytes to String Converter?

A decoder that parses each whitespace-separated decimal byte value (0-255) and decodes the resulting byte sequence as UTF-8 text.

It runs entirely client-side as part of this site's String Tools collection, so nothing you paste is ever uploaded to a server.

How Bytes to String Converter Works

Each token is validated as a byte (0-255), collected into a Uint8Array, and decoded with the browser's TextDecoder in strict ('fatal') mode.

The transformation happens synchronously in JavaScript the moment you type, with no network round trip involved.

When To Use Bytes to String Converter

Use it to decode a raw UTF-8 byte sequence, from a network capture, hex dump, or byte-array debugging session, back into readable text.

It's a fast way to get the answer without opening a code editor, a REPL, or writing a one-off script just to check.

Features

Advantages

  • Strict validation catches malformed UTF-8 instead of silently producing corrupted output.
  • Validates each byte value's range before attempting to decode.
  • Decodes with the browser's built-in TextDecoder rather than a hand-rolled UTF-8 routine, so multi-byte sequences, surrogate pairs, and emoji resolve exactly as the platform's own text handling would.

Limitations

  • Expects whitespace-separated decimal tokens, not hex or binary byte notation directly.
  • Assumes UTF-8 specifically, so bytes captured from a legacy encoding such as Latin-1 or Shift-JIS will either fail validation or decode into the wrong characters.

Examples

Decoding bytes with an emoji

Input

72 105 32 240 159 145 139

Output

Hi 👋

The single-byte ASCII characters and the four-byte emoji sequence are decoded back to the original text.

Best Practices & Notes

Best Practices

  • If decoding fails, check whether your byte sequence was accidentally truncated mid-character, since UTF-8 multi-byte sequences must be complete.
  • Keep the whole byte sequence together rather than decoding it in chunks, since a multi-byte character split across two runs is invalid in both halves.
  • Check the byte count against what you expect before decoding; because the encoding is variable-width, a four-byte emoji arriving as three bytes fails outright rather than degrading quietly.

Developer Notes

Decoding uses `new TextDecoder("utf-8", { fatal: true })`, matching the strict decoding approach used elsewhere in this site's Base64-to-JSON and similar decoders, so incomplete or invalid byte sequences fail loudly instead of silently substituting replacement characters.

Bytes to String Converter Use Cases

  • Decoding a raw UTF-8 byte sequence from a network capture or debugger
  • Verifying a string-to-bytes encoding round trip
  • Reconstructing text from a byte-array representation

Common Mistakes

  • Passing a truncated multi-byte sequence, which fails strict UTF-8 validation.
  • Pasting a list of code points rather than a list of UTF-8 bytes; the two representations only coincide for plain ASCII and diverge for everything above 127.

Tips

  • Use Convert a String to Bytes to generate correctly formatted input for testing.
  • A leading byte of 240 starts a four-byte sequence, 224 a three-byte one, and 192-223 a two-byte one, so you can predict the decoded character count from the leading bytes alone.

References

Frequently Asked Questions