Text Width
Paste text and read the four lengths that routinely disagree, on a numbered column grid. Width is an estimate from the Unicode tables, and everything your terminal might draw differently is flagged.
Bytes 63
Scalars 45
Graphemes 41
Lines 2
Max width 41
Line Bytes Scalars Graphemes Width Notes
1 12 7 7 9 ambiguous
2 50 37 33 41 zwj
Wrapped at 24 columns
1 2
123456789012345678901234
1.1 café 世界
2.1 joined 👨👩👧 and a
2.2 long line to wrap
Width is the unicode-width estimate, not a measurement of your terminal. Terminals disagree, especially about emoji and ambiguous-width characters.
Tabs advance to the next 8-column tab stop.
zwj: Zero-width joiner: several emoji joined into one. Counted here as one two-column emoji, which is what a terminal that can draw the joined glyph shows. A terminal that cannot falls back to the separate parts and takes several columns more.
ambiguous: Ambiguous width: the Unicode data marks these characters as ambiguous, so some terminals draw them in one column and some in two. Counted here as one.
This is generated in browser and is not sent to pah.moi servers.
Want a single character's full record? The Unicode Inspector takes it apart codepoint by codepoint. Lining up boxes and rules rather than prose? That is the ASCII & Unicode Diagram Studio.
About this tool2 paragraphs
See a string's four lengths that routinely disagree: UTF-8 bytes, Unicode scalars (code points), grapheme clusters (user-perceived characters), and terminal display width. Then see where the text actually lands: a numbered column ruler, every character drawn at its true cell count, per-line widths, and a preview of where a terminal would wrap it.
Width is an estimate. It comes from the Unicode width tables, not from your terminal, and terminals disagree: joined emoji, emoji presentation selectors and ambiguous-width characters are all flagged where they appear.
text-width-cli from the site's source with:
cargo build --release --bin text-width-cliSource and licence terms