Small tools. Better flow.

Text counter

Count characters, words, lines, and UTF-8 bytes live.

Usage guide

Your input stays in this browser.

Input & options

Text 1 MB

View code examples ↓

Result

Your result will appear here.

Code examples

Starting points for your own code. Run them in the environment shown below.

Node.js 22+ · ES module (.mjs)

Current inputs apply only to fields used by the example. Selected files are not embedded.

const text = "안녕 👋\nHello tools";
console.log({
  codePoints: [...text].length,
  graphemes: [...new Intl.Segmenter(undefined, { granularity: "grapheme" }).segment(text)].length,
  utf8Bytes: new TextEncoder().encode(text).length,
  lines: text ? text.split(/\r\n|\r|\n/).length : 0,
  whitespaceSeparatedWords: text.trim() ? text.trim().split(/\s+/).length : 0,
});

Put it to work

Count characters, words, lines, and UTF-8 bytes live.

Details that matter

Format and meaning

Visible characters use grapheme clusters. Code points and UTF-16 length are listed separately.

Supported scope and limits

Text 1 MB

Split inputs that exceed the limit. If a format or algorithm is unsupported, choose a tool that matches your requirements instead of silently changing the format.