π•Š

String Inspector analyze

Analyse a string for character count, byte length, lines, word count, and character class breakdown.

INPUTtext
0 lines 0 chars
1
STATSproperties
Tool Guide

What this tool does

Two strings that look identical are often not. One may carry trailing whitespace, contain a non-breaking space that renders like an ordinary space, or come from a Windows file where each line ends with a carriage return as well as a line feed. None of that is visible, yet it changes comparison results, hash values, and database lookups.

This tool breaks the input down from several angles. It reports character count and UTF-8 byte length separately, counts lines and words, and tallies how many letters, digits, spaces, and special characters are present. Character count and byte length are shown apart because they diverge sharply once non-ASCII characters or emoji are involved, and database column limits and API input limits are usually expressed in bytes.

When to use it

Use it to find out why a value exceeds a database length limit, to explain why two apparently identical strings compare as different, to detect invisible whitespace in copied text, or to calculate the real byte length of text containing non-ASCII characters.

Input and output examples

Input Hello ν•œκΈ€
Output 8 characters / 12 bytes in UTF-8

Two Korean characters add six bytes, so counts diverge.

Input value
Output Leading and trailing spaces detected, five characters of actual content

Explains lookups that fail because of whitespace in copied values.

Notes and limitations

Byte counts assume UTF-8. Systems using other encodings, such as EUC-KR where a Korean character takes two bytes, will report different numbers. Emoji and some other characters are built from several combined code points, so the number of glyphs you see can differ from the character count a program reports.

Frequently asked questions

Why do character count and byte count differ?

In UTF-8 an ASCII letter is one byte while many other characters take three. If a database limit is expressed in bytes, non-ASCII input reaches it much sooner.

Identical looking strings compare as different.

Invisible whitespace or differing line endings (CRLF versus LF) are the usual causes. Compare byte counts and control character presence for both values.

Copied