Skip to content
Run here 100% in your browser, no upload, no login

Text Truncator

Truncate text by characters, words or sentences with a custom ellipsis and HTML-safe closing.

How to use it

  1. Paste the text (or HTML) you want to shorten.
  2. Pick the unit: Characters, Words or Sentences, then set the limit.
  3. Choose the ellipsis: the single-character form, three dots, none, or a custom string.
  4. Switch on Keep HTML tags balanced when the input contains markup; a simple stack match appends any missing closing tags.
  5. Click Truncate. The comparison line reports length before and after.

Common use cases

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.