Truncate Text
Fit labels, excerpts, previews, or line-based data into a defined length without accidentally splitting a displayed emoji or combining sequence.
A QUICK WALKTHROUGH
How to use this tool
- Enter up to 100,000 characters and choose complete-text or per-line processing.
- Choose which side to keep, the maximum displayed-grapheme or code-point length, and an optional indicator.
- Truncate only values that exceed the maximum, then copy the result or download a text file.
The maximum includes the indicator
Keep beginning removes content from the right and places the indicator at the end. Keep ending removes content from the left and places the indicator at the beginning. The indicator consumes part of the selected maximum, so its unit count cannot exceed that maximum. Values already within the limit remain exactly unchanged and receive no indicator. A maximum of zero produces an empty result when no non-empty indicator is selected.
Unicode units and line scope are explicit
Displayed-grapheme mode uses browser Unicode segmentation so combining sequences, flags, emoji modifiers, and joined emoji normally stay intact. Code-point mode counts every Unicode scalar value separately and can split a displayed sequence. Complete-text mode counts LF line breaks as units. Per-line mode keeps line order, normalizes CRLF and CR to LF, and truncates each line independently, including empty and trailing lines. Input is limited to 100,000 UTF-16 characters, per-line mode to 50,000 lines, and output to 500,000 UTF-16 characters.
GOOD TO KNOW
Common questions
Is the indicator added when the text already fits?
No. A value whose selected-unit length is at or below the maximum is returned unchanged.
Does the indicator count toward the maximum?
Yes. With a maximum of 20 and a three-dot indicator, at most 17 source units remain.
Will emoji stay together?
Usually in displayed-grapheme mode. Code-point mode intentionally counts and can separate the underlying Unicode components.