Cap, with optional indicator and side selection
Length is the maximum character count of the output (per line if Per Line is on, otherwise of the whole input). If the source is at or under Length it passes through untouched. If it is over, the tool slices it down. Length is bounded 1 through 100,000 in the registry.
Side picks which end is cut. Right (default) keeps the start of the text and drops the tail. Left keeps the tail and drops the start. Ellipsis on inserts the Indicator string at the cut edge; off cuts cleanly with no marker. The default Indicator is ...; replace it with [...], …, or anything else you want.
Indicator length is included in the budget. So at Length 10 with Indicator ... the output keeps 7 characters of the source plus the 3-character indicator, total 10. With Ellipsis off the cut keeps the full Length of source. Per Line on applies the same rule to each line; off applies it to the whole input as one string.
How to use truncate text to a max length
- 1Paste your text into the input panel on the left.
- 2Set Length to the maximum character count.
- 3Pick a Side:
Rightcuts the tail,Leftcuts the start. - 4Toggle Ellipsis off if you want a clean cut, or change the Indicator if you want a different marker.
- 5Toggle Per Line on if each line should be truncated independently.
Keyboard shortcuts
Drive TextResult without touching the mouse.
| Shortcut | Action |
|---|---|
| Ctrl F | Open the find & replace panel inside the input Plus |
| Ctrl Z | Undo the last input change |
| Ctrl Shift Z | Redo |
| Ctrl Shift Enter | Toggle fullscreen focus on the editor Plus |
| Esc | Close find & replace, or exit fullscreen |
| Ctrl K | Open the command palette to jump to any tool Plus |
| Ctrl S | Save current workflow draft Plus |
| Ctrl P | Run a saved workflow Plus |
What this tool actually does
Pass-through under the limit
Text at or shorter than Length is returned unchanged with no indicator inserted. Truncate only fires when the source is strictly longer than the limit.
Side picks the cut end
Right keeps text.substring(0, len - ind.length) and tacks the indicator on the end. Left keeps text.substring(text.length - len + ind.length) and prefixes the indicator on the start.
Ellipsis is configurable
When on, the Indicator string (default ...) is inserted at the cut edge and counts toward the total length budget. When off, the cut is clean and the full Length is filled with source characters.
Per Line truncates each line independently
With the toggle on the input is split on \r?\n, each line is checked against Length, and the result is rejoined with \n. With it off the whole input is treated as one string.
Length cap is 100,000 characters
The registry bounds Length between 1 and 100,000. That covers tweet-sized snippets, SMS limits, and large editor blocks without hitting browser memory limits.
Worked example
Length 26, Side Right, Ellipsis on, Indicator .... The first 23 source chars plus the 3-char indicator total 26.
The quick brown fox jumps over the lazy dog by the river bank.
The quick brown fox jum...
Settings reference
| Behaviour | Effect on output |
|---|---|
| Length (1-100000) | Maximum character count of the output. |
| Source at or under Length | Passes through unchanged. No indicator inserted. |
Side = Right |
Tail is cut. The start of the text is kept. |
Side = Left |
Start is cut. The tail of the text is kept. |
| Ellipsis on | Indicator string is inserted at the cut edge and counts toward Length. |
| Ellipsis off | Clean cut. Length source chars are kept; no indicator. |
| Indicator | Marker string when ellipsis is on. Default ...; any string accepted. |
| Per Line on | Each line is truncated independently against Length. |
| Per Line off | The whole input is truncated as one string. |
| On Word off (default) | Cut lands at the exact character position - may split a word mid-letter. |
| On Word on | Cut moves to the nearest whitespace within the budget so the kept text ends on a complete word. If no whitespace lies within half the budget, falls back to the character cut. |
FAQ
Does the indicator count toward Length?
How do I keep the end of the text instead of the start?
Left. The cut happens at the start, so the tail of the source is preserved.Can I change the indicator?
[...], … (single-char ellipsis), or a custom marker.