Free Text Truncator

Truncate text to a character or word limit with a custom suffix.

How It Works

  1. Paste your text: Enter or paste any text into the input field, articles, descriptions, social posts, or any content you need shortened.
  2. Set the limit: Choose the character or word limit that fits your target platform (e.g., 160 for meta descriptions, 280 for Twitter).
  3. Copy the result: The truncated text appears instantly. Click Copy to grab the shortened version, ready to use.

Why Use Text Truncator?

Every platform has length limits, Twitter, meta descriptions, database fields, notifications, and SMS messages all enforce strict character counts. Manual truncation often cuts awkwardly mid-word or leaves trailing punctuation. This tool truncates intelligently at word boundaries and lets you preview exactly how the text will appear within your limit, saving time and avoiding formatting errors.

Features

Frequently Asked Questions

Does it cut mid-word?

No. The truncator cuts at the nearest word boundary before the limit, so the output always ends on a complete word. This keeps your truncated text readable and professional.

Can I use it for meta descriptions?

Yes. Set the limit to 155–160 characters for Google meta descriptions, or 120 characters for tighter truncation. The tool shows your character count in real time so you can fine-tune the result.

What happens to special characters and emoji?

Special characters and emoji are preserved as-is. Note that emoji can count as 2 characters in some platforms, verify the final count on your target platform if precision matters.

What «one character» actually means

A user sees one «character» where JavaScript sees three values. The string «👨‍👩‍👧‍👦» (family of four emoji) is one grapheme cluster, seven Unicode code points joined by Zero-Width Joiners (U+200D), and eleven UTF-16 code units. That is why "👨‍👩‍👧‍👦".length === 11 in JavaScript. The authoritative definition lives in Unicode Standard Annex #29 «Unicode Text Segmentation» (current version 15.0, September 2022), which specifies grapheme cluster boundaries, word boundaries, and sentence boundaries. Modern JavaScript exposes UAX #29 through Intl.Segmenter, standardised in ECMAScript 2022 and shipping in every browser since Firefox 125 (April 2024); Chrome had it since version 87 (November 2020) and Safari since 14.1 (April 2021). Use new Intl.Segmenter('en', { granularity: 'grapheme' }) to count the way humans count.

Character limits across the platforms you ship to

Word boundaries are not just split(' ')

The naïve word-boundary truncator splits the input on /\s+/ and cuts before the first word that pushes you over the limit. That works for English. It fails on Chinese, Japanese, Korean and Thai, none of which use whitespace between words: the entire input ends up as one «word», so the trimmer either keeps it all or cuts it all. Arabic uses spaces but joins letterforms in ways that change boundary positions. Intl.Segmenter with granularity: 'word' applies the UAX #29 word-boundary algorithm and produces correct cuts for every language. It also distinguishes «word-like» segments (return isWordLike: true) from punctuation and whitespace segments, so you can find the last word boundary before your character budget with one pass over the segments.

CSS truncation: text-overflow and line-clamp

If the goal is to truncate visually while keeping the full text in the DOM (so it stays available to screen readers, search engines, and copy-paste), use CSS. Single-line truncation requires three properties together: overflow: hidden; white-space: nowrap; text-overflow: ellipsis;. text-overflow: ellipsis is defined in CSS Basic User Interface Module Level 4 (W3C Candidate Recommendation August 2021) and has shipped in every browser since Firefox 7 (September 2011); Internet Explorer 6 had it as early as August 2001. Multi-line truncation uses display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;. The -webkit-line-clamp property dates to WebKit 2009 and is now defined in CSS Overflow Module Level 3 (W3C Working Draft). The unprefixed line-clamp ships in Safari 18 (September 2024) and Firefox 125 (April 2024); always include the -webkit- form as a fallback. Critical limitation: CSS truncation is purely presentational. The full text is still in the HTML source, so the SEO snippet, the email summary, and the JS-driven search index all see the un-truncated string.

Common mistakes

More frequently asked questions

Why does Twitter count my URL as 23 characters even when it is much longer?

Twitter wraps every URL through its t.co shortener for analytics and abuse detection, so it bills every URL at the shortener's worst-case length: 23 characters for HTTPS. If you write a 100-char URL, it counts as 23 in Twitter's UI. The same rule applies to Twitter Card metadata. The twitter-text open-source library (Twitter, MIT) implements the exact rule if you need byte-perfect simulation.

Does this tool respect RTL languages like Arabic and Hebrew?

The text content is preserved including its bidi (bidirectional) markers. The truncation operates on logical-order characters, so cutting an Arabic sentence at character 100 cuts at the 100th logical character (the one a screen reader would announce first). The display order may reverse visually because of the right-to-left flow, but the underlying string is consistent.

Why is my truncated SMS still split into three parts at 161 characters?

SMS uses 7-bit GSM encoding for Latin-only text, fitting 160 characters in one segment. But any character outside GSM-7, including the curly «smart» quotes from autocorrect (U+2018 / U+2019), the Unicode ellipsis (U+2026), or emoji, forces the whole message to UCS-2 encoding at 70 characters per segment. If your truncated 160-char message contains one smart quote, the carrier splits it into three 70-char UCS-2 parts. Replace smart quotes with ASCII quotes for SMS.

Can I truncate HTML-formatted text without breaking tags?

Not safely with a character-counting cut. Either strip the HTML tags first (via DOMParser or a server-side parser), truncate the plain text, then optionally re-wrap; or use a DOM-aware truncator that walks the node tree and clones whole-text-node prefixes. Pure regex on the HTML string is not safe (HTML is not a regular language).

Is anything sent to a server?

No. The text you paste, the limit you choose, the suffix you set, and the truncated output are all processed in your browser's JavaScript. No network call is made and no copy of your input is stored. Open the Network tab in DevTools to verify.

Related Tools

Character Counter Word Counter Whitespace Remover Case Converter