ForHosting KIT · Text & AI

Grapheme count calculator

Count the characters a person actually sees in a text, also known as graphemes, along with its code points and UTF-16 units: abc gives 3, 3 and 3. The numbers part ways with accents and emoji built from several pieces. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Text
abc
You get
Graphemes
3
Code points
3
Utf16 units
3

Count user-perceived characters (extended grapheme clusters) in Unicode text. Search intent: grapheme count / unicode character count. No network calls, no random seeds, and no server state are required for a correct answer.

Characters as a person sees them

Ask how long a piece of text is and the answer depends on who is counting. A reader counts the characters they see. Underneath, Unicode stores text as code points, and many programs measure length in UTF-16 units. For plain letters the three agree: abc is 3 graphemes, 3 code points and 3 UTF-16 units. They part ways with combined characters, such as an accented letter written as two pieces or an emoji assembled from several, which a person sees as one character but the computer stores as more. This counter reports all three side by side.

Why the grapheme count matters

The grapheme count, known technically as extended grapheme clusters, is the one that matches what people perceive, so it is the right number when a limit is meant for humans: a display name, a short message, a caption. The code point and UTF-16 figures help when you need to compare with what a program reports, or to explain to a student why two tools disagree about the length of the same word. Everything runs in your browser, with no network calls and nothing random, so the same text always gives the same three numbers.

How it works

Count user-perceived characters (extended grapheme clusters) in Unicode text. Graphemes use Intl.Segmenter when available; code points and UTF-16 units are also reported. The implementation is pure JavaScript with no external services.

No network calls, no random seeds, and no server state are required for a correct answer. Failed jobs are not billed. Landings target the stated search intent with precise keywords.

Prefer explicit units and ranges over silent coercion of bad types. When a field is optional, defaults are documented in params and echoed in the

When to use it

Use this when your search intent matches the calculator name and you need a reproducible answer for teaching, finance ops, GIS, text tooling, or unit history work. Count user-perceived characters (extended grapheme clusters) in Unicode text. No network calls, no random seeds, and no server state are required for a correct answer.

Failed jobs are not billed. Landings target the stated search intent with precise keywords. Prefer explicit units and ranges over silent coercion of bad types.

When a field is optional, defaults are documented in

Does it call the network?

No. All math and text transforms are local and deterministic.

What is a grapheme?

It is what a reader perceives as a single character. The technical name is an extended grapheme cluster: a letter with its accent mark, or an emoji built from several pieces, counts as one grapheme even when it is stored as several parts.

Why does it report three different counts?

Because each answers a different question. Graphemes are the characters a person sees, code points are the Unicode units underneath, and UTF-16 units are the smaller pieces many programs count when they measure the length of a text.

Is the grapheme count the right one for a length limit?

It is the one that matches what people perceive, so it suits limits meant for humans, such as a display name or a short caption. If a program enforces the limit, compare with the figure that program actually uses.

Will the same text always give the same numbers?

Yes. The count makes no network calls and uses nothing random, so the same text always gives the same three numbers, which makes it dependable for teaching or for double-checking a length.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/text/grapheme-count

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/text/grapheme-count \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"👨‍👩‍👧‍👦"}'
{
  "text": "👨‍👩‍👧‍👦"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "text.grapheme_count",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

The calculator is free in the browser, deterministic, and identical in the API path. Inputs are validated before any arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE results when decimals are requested. Use the same JSON contract from spreadsheets, CMS

How it works

The calculator is free in the browser, deterministic, and identical in the API path. Inputs are validated before any arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE results when decimals are requested. Use the same JSON contract from spreadsheets, CMS hooks, automation, or teaching demos.

Inputs, limits and rounding

Optional decimals use half-up once. No network calls, no random seeds, and no server state are required for a correct answer. Failed jobs are not billed. Landings target the stated search intent with precise keywords. Prefer explicit units and ranges over silent coercion of bad types. When Provide the required parameters as JSON numbers or strings as documented. Invalid types, missing required fields, or out-of-range values raise invalid_input with a clear message. Outputs echo key inputs so automation can log the full context of each call. The calculator is free in the browser, deterministic, and identical in the API path. Inputs are validated before any arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE results when decimals are requested. Use the same JSON contract from spreadsheets, CMS hooks, automation, or teaching demos.

When to use it

The calculator is free in the browser, deterministic, and identical in the API path. Inputs are validated before any arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE results when decimals are requested. Use the same JSON contract from spreadsheets, CMS hooks, automation, or teaching demos.

Quick check

Paste values in the free widget and compare with a spreadsheet.

Automation

Call the API with the same JSON contract from n8n, scripts, or CMS.

Teaching

Show the formula and pinned golden examples without proprietary software.

Is it free in the browser?

Yes. Tier A runs fully client-side with the same core as the API.

What happens on bad input?

The handler throws invalid_input; failed jobs are not billed.

Can I use it from the API?

Yes. Send the same JSON fields documented in params.

Who authors this?

Aspire (elon@forhosting.com), EN-only delivery; Nitro hydrates locales.

Read the full KIT documentation →