String Byte Inspector

Inspect the individual bytes of a string — view each character's code point, UTF-8 byte sequence, and hex representation side by side.

String ↔ Byte Array Inspector

Detailed analysis of how text is represented as bytes, with hex and decimal views.

💡 About String & Byte Analysis

This tool shows how text is represented internally as bytes, helping debug encoding issues.

What you'll see:

  • UTF-16 Code: JavaScript's internal character representation
  • UTF-8 Bytes: How many bytes each character uses in UTF-8
  • Hex Values: Hexadecimal representation of each byte
  • Description: Character type (ASCII, Unicode, Control, etc.)

Use cases: Debugging encoding issues, understanding string sizes, analyzing text data.

What is a String Byte Inspector?

A string byte inspector breaks a piece of text down to its lowest level — the individual bytes that represent each character in memory. For each character it shows the Unicode code point (e.g., U+1F600), the UTF-8 byte sequence (e.g., F0 9F 98 80), and the decimal or binary equivalents.

This level of detail is invaluable when diagnosing encoding bugs, implementing binary protocols, verifying hash inputs, or simply learning how text storage actually works at the byte level.

Common Use Cases

Encoding Bug Diagnosis: Identify exactly where a character encoding mismatch occurs by comparing expected and actual byte sequences character by character. Protocol Implementation: Verify that strings are serialised with the correct byte lengths and boundaries before sending them over a binary protocol. Cryptographic Input Verification: Confirm the exact bytes that will be fed into a hash function or HMAC to reproduce a signature deterministically. Unicode Edge Case Exploration: Inspect how multi-byte characters, combining marks, zero-width joiners, and emoji sequences expand into bytes.


Tips

Remember that string length (in characters) and byte length often differ — a single emoji can occupy 4 bytes, and a character with a combining mark may appear as one glyph but span multiple code points. Invisible characters such as zero-width spaces (U+200B) and byte-order marks (U+FEFF) are revealed by byte inspection, which is helpful when debugging mysterious parsing failures. Use the byte inspector alongside the UTF-8 encoder and hex encoder to cross-check results and build a complete picture of how your string is represented at every layer.


Share on
Share on FacebookShare on XShare on LinkedIn
Did you find this page useful?