Skip to main content

Text & Lists

Shorten Text Processor

Transform text with Truncate and the selected rules. Enter the text, set the transformation rules, then copy the result.

Tool workspace

Your input stays in this browser.

Add the required input to continue.

Needs input

You can run the tool again after any change.

List options

Split input with
Keep items from

Your result appears here

Transform text with Truncate and the selected rules. Enter the text, set the transformation rules, then copy the result.

This tool runs open-source code from OmniTools (MIT License). See open-source credits.

Shorten Text Processor keeps a selected number of items from the start or end of a parsed list.

one two Processing runs in the browser.

Instructions

  1. Provide text or data for this tool.
  2. Choose whether the length applies from the start or end.
  3. Enter a non-negative item count and set the output separator.
  4. Compare the result with the original when the count exceeds list length.

Example

Input: one two three four

Settings: Shorten Text Processor: Split on newline, keep 2 items from the start, and join with newline.

Result: one two

Limits

  • Shorten Text Processor: The length controls items, not characters.
  • Shorten Text Processor: A negative or missing length fails validation.
  • Shorten Text Processor: The operation runs in the browser and does not need a network service.