Text
String Length Counter
Input
Output
Run process to generate output.
Frequently Asked Questions
Does the character count include spaces and newlines?
Yes by default. The tool counts all characters including spaces (U+0020), tabs (U+0009), and newline characters (U+000A, U+000D). Toggle 'exclude whitespace' to count only non-whitespace characters.
How are emoji and multi-byte characters counted?
This tool counts Unicode code points, so each emoji counts as 1 (even compound emoji like flag sequences may appear as 1). JavaScript's .length property counts UTF-16 code units, which can count some emoji as 2. This matters when setting database VARCHAR limits or API character limits.
Why do different tools report different lengths for the same string?
Length depends on the counting unit: bytes (UTF-8, UTF-16), Unicode code points, or grapheme clusters (visible characters). A single skin-tone emoji can be 1 grapheme, 2 code points, and 8 UTF-8 bytes. This tool reports code point count, which is the most common definition.