Text Truncator
Truncate text by characters, words or sentences with a custom ellipsis and HTML-safe closing.
How to use it
- Paste the text (or HTML) you want to shorten.
- Pick the unit: Characters, Words or Sentences, then set the limit.
- Choose the ellipsis: the single-character form, three dots, none, or a custom string.
- Switch on Keep HTML tags balanced when the input contains markup; a simple stack match appends any missing closing tags.
- Click Truncate. The comparison line reports length before and after.
Common use cases
- Cutting a description to fit a meta tag or card preview.
- Building a fixed-size excerpt list from long articles.
- Shortening sample text for a design mockup.
- Clipping HTML fragments to a safe length without leaving open tags.
Why it stays private
Truncation is string work in your browser. Unpublished copy, customer text and internal drafts are never uploaded.
FAQ
Q: Does the HTML mode parse markup properly? A: No, it uses a simple stack match: it tracks open and close tags and appends the missing closers. Treat it as a safety net, not a validating parser.
Q: What happens if the limit is larger than the text? A: Nothing is cut and no ellipsis is added; the original text is returned unchanged.
Q: How are words counted for truncation? A: Text is split on whitespace, so runs of spaces become a single space in the output.
Your data stays on this device
Text Truncator runs 100% locally. Everything you paste or drop is processed by your own browser and never transmitted. Nothing is stored on our servers — close the tab and it is gone.
Nothing you type is sent to a server, logged, or used for analytics. The page works even with your network disconnected after first load.