Count characters in text

Paste any text and get the character count back. By default the tool reports two numbers: characters with spaces and characters without spaces. Toggles let you exclude tabs or newlines from the total, or switch to a per-line count. The transform runs in your browser; nothing uploads. For a wider breakdown, jump to text statistics.

Input
Line 1:1 LF cloud_done Saved locally
Result Character Counter
0 lines 0 chars

Character counting, with the toggles you actually need

A character count is the number of code units in a string. JavaScript reports "hello".length as 5, and that is the figure used here, after applying any toggles you set. With every toggle on (the default) you get a two-line summary: characters with spaces (the raw length) and characters without spaces (length after stripping \s). That mirrors what Twitter, Bluesky, and most CMS limits report.

A code unit is not the same as a "visible character". Most Latin, Greek, and Cyrillic letters are one code unit each, but a single emoji is two, and a flag emoji is four; an accented letter typed as base + combining mark counts as two even though it looks like one glyph. The figure this tool reports is the one length-counters in form fields, social platforms, and SMS gateways enforce, so it is the right number for "will this fit?" questions. If you need user-visible glyph counts (grapheme clusters) the answer can be lower.

The four toggles change which characters get counted. Spaces controls whether U+0020 spaces are included. Tabs controls U+0009 tabs. Newlines controls \n and \r. Per Line switches the output from a single total to one count per line of input, which is handy when you need a CSV-style report.

For length checks against a specific limit (Twitter 280, SMS 160, meta description 156) just paste and read the number. For a fuller report that includes word, line, sentence, and paragraph counts in one pass, see text statistics.

How to use count characters in text

  1. 1Paste or type your text into the input panel on the left.
  2. 2The character count appears in the output panel as you type.
  3. 3Open the action bar to toggle Spaces, Tabs, or Newlines in or out of the count.
  4. 4Turn on Per Line if you want one count per line of input instead of a single total.
  5. 5Click Copy to grab the result, or Download to save it as a text file.

Keyboard shortcuts

Drive TextResult without touching the mouse.

Shortcut Action
Ctrl FOpen the find & replace panel inside the input Plus
Ctrl ZUndo the last input change
Ctrl Shift ZRedo
Ctrl Shift EnterToggle fullscreen focus on the editor Plus
EscClose find & replace, or exit fullscreen
Ctrl KOpen the command palette to jump to any tool Plus
Ctrl SSave current workflow draft Plus
Ctrl PRun a saved workflow Plus

What this tool actually does

Default output: with-spaces and no-spaces totals

When all toggles are on, the output is two lines: Characters (with spaces): N and Characters (no spaces): M. The first is JavaScript's native String.length (UTF-16 code units). The second strips every whitespace character (\s) before counting.

Spaces, tabs, newlines toggle independently

Turn off Spaces to skip U+0020 only (other whitespace still counts). Turn off Tabs to skip \t. Turn off Newlines to skip \n and \r. Switching any single toggle off collapses the output to a single Characters: N line so the number is unambiguous.

Per-line mode for CSV-friendly counts

Flip Per Line on and the tool emits one count per line of input. The current Spaces/Tabs/Newlines toggles still apply to each line. Empty lines produce 0.

Counts UTF-16 code units, not grapheme clusters

A code unit is what JavaScript reports as str.length. Most BMP characters (Latin, Greek, Cyrillic, accented vowels) are one code unit each. Emoji and rare CJK ideographs above U+FFFF are two code units (a surrogate pair). The figure matches what Twitter, GitHub, and most form fields enforce.

Runs entirely in your browser

No upload, no logging, no server round-trip. The count fires on every keystroke and updates the output panel immediately.

Worked example

Line one is 13 code units, line two is 14, the joining newline is 1: 28 with whitespace. Stripping the two spaces and the newline leaves 24. Toggle Newlines off and the with-spaces figure drops by 1; toggle Spaces off as well and it drops by 3.

Input
Hello, world!
A second line.
Output
Characters (with spaces): 28
Characters (no spaces): 24

Settings reference

Option Effect on output
Spaces (default on) Include U+0020 spaces in the count. Off skips them.
Tabs (default on) Include U+0009 tabs. Off skips them.
Newlines (default on) Include \n and \r. Off skips them.
Per Line (default off) One count per input line, joined by newlines.
All defaults Two-line summary: with-spaces total and no-spaces total.
Any toggle off Single-line summary: Characters: N.

FAQ

Does it count spaces?
Yes by default, in the with-spaces total. The no-spaces total strips every whitespace character first. Turn the Spaces toggle off in the action bar to exclude U+0020 from the count entirely.
How are emoji counted?
As UTF-16 code units, which is what String.length reports. A single emoji like 😀 is 2 code units. A flag emoji built from two regional-indicator letters is 4. That matches Twitter and GitHub character limits.
What does the no-spaces total exclude?
Every character matched by the regex \s: U+0020 spaces, tabs, line feeds, carriage returns, vertical tabs, form feeds, and Unicode whitespace like U+00A0 (non-breaking space).
Can I get a count per line?
Yes. Turn on Per Line in the action bar. The output becomes one count per input line. Empty lines report 0.
Is the input sent anywhere?
No. The count runs in your browser via a JavaScript loop. Nothing uploads, nothing is logged, no record of your text exists on our servers.