Invisible Characters & UTF-8 Inspector

#CharCodepointUTF-8 HexHTML EntityNote

Detecting Invisible Characters & Inspecting UTF-8 Codepoints

Copy-pasting text from PDFs, Slack, Microsoft Word, emails, or web pages frequently introduces invisible Unicode characters that break parsers, fail string equality checks, or cause mysterious syntax errors in code and config files. Because these characters have zero width or look identical to normal ASCII spaces, normal text editors make them impossible to spot. This inspector breaks your string down character by character, displaying each Unicode codepoint (U+XXXX), exact UTF-8 byte sequence in hex, HTML numeric entity, and a warning badge for hidden or control characters.

Common Hidden Culprits to Watch For

  • Zero-Width Space (U+200B, ZWSP): Completely invisible and zero pixels wide. Frequently sneaks into URLs, API keys, and JSON strings copied from rich-text editors or chat apps, causing "invalid URL" or "auth failed" bugs.
  • Byte Order Mark (U+FEFF, BOM): Appears at the start of UTF-8 files exported by Windows Notepad or Excel CSV exports (EF BB BF). It can break JSON parsers, shell script shebangs (#!/bin/bash), and PHP headers.
  • Non-Breaking Space (U+00A0, NBSP): Looks identical to a normal ASCII space (U+0020), but programming language lexers, YAML parsers, and SQL engines do not treat it as whitespace.
  • Carriage Return (U+000D, \r): Windows CRLF line endings (\r\n) can break Linux bash scripts ($'\r': command not found) or regex $ anchors.
  • Soft Hyphen (U+00AD) & Directional Marks (U+200E/U+200F): Hidden formatting characters that alter text equality, sorting, and database lookups.

Understanding Codepoints vs. UTF-8 Bytes (FAQ)

  • Why do some characters have 2, 3, or 4 UTF-8 hex bytes? UTF-8 is a variable-width encoding. Standard ASCII characters (U+0000–U+007F) take 1 byte, Latin/Cyrillic/Greek letters take 2 bytes, CJK and symbols like € take 3 bytes, and emojis (such as 🚀, U+1F680) take 4 bytes.
  • How does this handle emojis correctly? JavaScript's Array.from(str) iterates over full Unicode codepoints (handling UTF-16 surrogate pairs properly) rather than splitting 4-byte emojis in half.
  • Is my inspected text kept private? Yes, inspection runs 100% client-side in your browser.
Please read the privacy policy (agreement of the cookies usage, other websites embedded content, etc.). If you continue to use the site, we will assume that you agree with our privacy policy.
OkPrivacy Policy