Learn to calculate by playing with Character counter
A short game to see where the result comes from. Pick a language and start; you can stop halfway and come back.
Loading the game…
What you will practise
Characters with and without spaces, lines and bytes in a text.
How it works
Visible Unicode characters are counted, with and without spaces. Bytes are computed for UTF-8 encoding, where an accented letter takes two.
Formula
Characters = text length in Unicode
Bytes = actual size in UTF-8
Worked example
The text “Hello, how are you?” has 19 characters with spaces and 16 without, and occupies 19 bytes in UTF-8.
How to play
First pick your language. Then work through the challenges one by one: each sets out a case with real numbers and, if you get stuck, you can ask for a hint. When you answer, you see whether you got it right and why. Progress is saved only in your browser, so you can stop halfway and carry on another day.