Clean Text · browser-local

Text Length Limiter

Cut text down to a hard length limit for a bio, meta description, or byte-capped field. GlyphSift measures in graphemes, code points, or UTF-8 bytes, always keeps whole characters instead of splitting an emoji, and can add an ellipsis whose own length is counted against the budget. It only trims and reports — it never summarises or rewrites.

Index state
draft
Reviewed
2026-09-16
Input limit
5,000 graphemes
75 graphemes75 code points75 bytes
Length limit

Original 75 · result 75 graphemes. Within the limit — nothing removed.

Live result

Text Length Limiter

This bio is a little too long for a 280 character limit and needs trimming.

Good fit

Use this tool when

  • A field has a strict character or byte limit.
  • You need to keep emoji and combined characters intact when cutting.
  • You want the ellipsis included in the length budget, not added on top.

Keep the original

Avoid it when

  • You want a summary or reworded shorter version.
  • You need to trim by words or sentences rather than length.
  • The destination counts length in a unit not offered here.
01

Reviewed truth vectors

Examples that expose the edge cases

Inputabcdefg (limit 5 graphemes, ellipsis on)
Outputabcd…

Four characters plus the ellipsis fill the 5-grapheme budget.

InputHi 👨‍👩‍👧‍👦 there (limit 4 graphemes)
OutputHi 👨‍👩‍👧‍👦

The family emoji is one grapheme and is kept whole, not split.

Inputcafé (limit 4 bytes)
Outputcaf

é is two UTF-8 bytes, so it is dropped to stay within four bytes.

02

Transparent implementation

How it works

  1. 01

    Measure the text in the chosen unit — graphemes, code points, or UTF-8 bytes.

  2. 02

    If an ellipsis is enabled, subtract its length from the budget first.

  3. 03

    Add whole graphemes until the next one would exceed the budget, then report the used and total counts.

03

Known limitations

What the result cannot promise

Trimming is by length, not by words or sentences.

A byte or code-point limit smaller than one character can yield only the ellipsis or an empty result.

It measures the units shown here; a destination may count length differently.

04

Questions before copying

Frequently asked questions

Does the ellipsis count toward the limit?

Yes. When the ellipsis is on, its length in the chosen unit is subtracted from the budget first, so the final result including the ellipsis stays within the limit.

Will it cut an emoji in half?

No. It adds whole graphemes only, so an emoji or combined character is either kept complete or left out — never split into broken pieces.

Which unit should I use?

Use graphemes for what a reader sees, code points for many API limits, and UTF-8 bytes for storage or protocol fields that cap raw bytes.

05

Experience, expertise & trust

How we verify this tool

GlyphSift Editorial — Text-engine authors & reviewers

The GlyphSift Editorial team designs the deterministic text engine, writes each tool's examples against real Unicode edge cases, and reviews every claim before a page becomes eligible for indexing. We build and test the software we document; we do not outsource the copy to generic content mills.

Each tool page is reviewed against the same six input classes the engine is tested with — ASCII, emoji, combining marks, non-Latin scripts, empty input, and 5,000-grapheme input — and cannot become eligible if it is only a parameter variation of another page.

Automated evidence

  • Tool-contract & coverage suite30 deterministic cases

    tests/tools-30.test.mjs mirrors the ToolRunner dispatch and asserts every registered engineId returns the contracted output shape, plus a coverage guard so no tool silently drops characters.

    Run in: node --test after a production build (vinext build)
  • Rendered-HTML suite12 deterministic cases

    tests/rendered-html.test.mjs renders the deployed server bundle and asserts the Unicode-version manifest and each wave's tool markup are present in the server-rendered HTML.

    Run in: node --test against the built dist/server bundle
  • Transform & cleanup suite21 deterministic cases

    tests/transform-cleanup.test.mjs exercises each deterministic cleanup and transform action against whitespace, duplicate, ordering, casing, and HTML-to-text edge cases.

    Run in: node --test, no network, no randomness

Standards this tool follows