Truncation shows up constantly across the web and in software. A product card shows the first line of a description and cuts the rest. A search result shows a snippet around the matching text. A meta description gets cut off by Google at a certain length regardless of how it was written. A notification banner has room for one short line. Getting the cutoff point right, without slicing a word in half or leaving a stray trailing space, is a small detail that a text truncator handles correctly every time.
Everything runs locally in your browser as plain string slicing. Nothing you paste is uploaded to a server, so shortening a draft, a product description or an internal note is exactly as private as editing it in a local text editor.
Truncating by character count versus word count
Character count truncation is how you shorten text to character limit requirements exactly, cutting at an exact number of characters, which is the right choice whenever the destination enforces a strict character limit, such as a meta description, an SMS message or a database column with a fixed maximum length. The result always ends at exactly the limit you set, or fewer characters if a whole word boundary is respected and the option to avoid cutting mid word is turned on.
To cut text at word count instead, word count truncation keeps a fixed number of whole words and discards the rest, which produces a more natural looking result for previews and summaries, since it never leaves half a word dangling. This is the better default for a card preview, an excerpt or a search snippet, where reading naturally matters more than hitting an exact character budget.
- Character limit: cuts at an exact character count, ideal for strict platform limits.
- Word limit: keeps a fixed number of whole words, ideal for natural looking previews.
- Avoid cutting mid word: when truncating by character count, back up to the nearest space.
- Ellipsis suffix: append three dots or a custom marker to show the text was shortened.
When to add an ellipsis and when to leave it off
An ellipsis signals to the reader that more text existed beyond the cutoff, which matters whenever the truncated text is a preview linking to the full version, such as an article excerpt or a product card that opens a detail page. Leaving the ellipsis on tells the reader there is more to see and invites the click through.
Leave the ellipsis off when the truncated text is the final, standalone version rather than a preview of something longer, for example a hard character limit imposed by a form field where the shortened text is genuinely all that will ever be shown. Adding an ellipsis there just wastes characters from an already tight limit for no benefit to the reader.
Why cutting mid word usually looks wrong
A character limit applied blindly will happily cut a word in half, turning wonderful into wonde and appending an ellipsis to produce wonde..., which reads as a mistake rather than an intentional shortening. This text truncator's avoid cutting mid word option instead looks backwards from the exact limit to the nearest space and cuts there instead, so the visible result always ends on a complete word.
The tradeoff is that the result can land slightly under the character limit you set, since backing up to a word boundary discards a partial word rather than keeping it. For most previews that is the right tradeoff, since a few characters of unused budget is far less noticeable than a broken word at the very end of the visible text.
Common character limits worth truncating to
Different platforms and formats enforce very different limits, and this text truncator is built to hit any of them exactly since you set the number yourself rather than picking from a fixed preset. A Google search result title is commonly cut around 60 characters and a meta description around 155 to 160 characters, though Google measures and cuts by rendered pixel width rather than a strict character count, so these numbers are a close approximation rather than an exact rule.
- Meta description: roughly 155 to 160 characters before Google truncates it in search results.
- SMS message: 160 characters for a single standard GSM encoded message segment.
- Twitter or X post: 280 characters for a standard post.
- Card preview or excerpt: commonly 100 to 200 characters or 15 to 25 words, depending on the layout.
This text truncator slices characters and rejoins words differently
For character based truncation, the tool slices the input string at the exact index you specify using standard JavaScript string slicing, then optionally walks backward to the nearest space if avoiding a mid word cut is turned on. For word based truncation, the text is split on whitespace into individual words, the first N are kept, and they are rejoined with single spaces.
All of this happens in your browser tab with no server call involved, so a text truncator run on sensitive draft copy never leaves your device, and there is no limit on how much text you can paste in beyond what your browser can comfortably hold in memory.
How to truncate text online
- 1
Paste your text
Drop in a text file or paste the paragraph or block of text you want to shorten.
- 2
Choose character or word limit
Pick whether the cutoff should be counted in characters or in whole words.
- 3
Set the limit
Enter the maximum number of characters or words the result should keep.
- 4
Choose an ellipsis option
Turn on an ellipsis suffix if the truncated text is a preview of something longer.
- 5
Copy or download the result
Copy the shortened text to your clipboard or download it as a plain text file.
Related tools worth bookmarking
Sources and further reading
- MDN: String.prototype.sliceThe browser method this text truncator uses to cut a string at a specific character index.developer.mozilla.org
- Google Search Central: Control your snippetExplains that search result snippets and meta descriptions are truncated by rendered width, not a fixed character count.developers.google.com
Frequently asked questions
Common questions about the text truncator.
Only if you want it to. By default, character based truncation backs up to the nearest word boundary so the result never ends mid word. Turn off the avoid cutting mid word option if you specifically need the output to end at the exact character count regardless of where a word falls.
Character truncation cuts at an exact number of characters, which suits strict platform limits such as a meta description or an SMS message. Word truncation instead keeps a fixed number of whole words, which usually reads more naturally for a preview or an excerpt since it can never leave a partial word at the end.
Yes. When an ellipsis is added, this text truncator reserves space for it within the limit you set, so the text itself is cut slightly shorter to make room, and the final result including the ellipsis still fits within the character count you specified.
Yes. As a text ellipsis generator, the suffix field accepts any text you like, so you can use the single character ellipsis symbol, a custom marker such as (more), or nothing at all if the destination does not need a visual signal that the text was shortened.
Search engines measure and cut meta descriptions by rendered pixel width on the results page rather than by a strict character count, so a limit around 155 to 160 characters is a close and commonly used approximation rather than an exact guarantee. Very wide characters can still be truncated slightly earlier than a plain character count would predict.
No. Character based truncation slices the string at the index you set using the browser's own String.slice, and word based truncation splits on whitespace and rejoins the first few pieces, both acting directly on the text already sitting in the input box. Neither operation constructs a request of any kind, so a draft product description or an internal note is only ever read by the slicing running in your own tab.