Truncate a List Without Uploading
Cut a list down to a maximum number of items (the default is 3). You can keep the start or the end (the default is the end). Split and join separators default to a comma, and you can split with a regular expression instead.
This tool runs in your web browser: your files and text are processed on your device and are not uploaded to TidyKit servers. Free, no sign-up.
How to truncate
1. Paste the list, for example `a,b,c,d,e`. 2. Set the length to the number of items to keep. 3. Choose the start or the end. 4. Copy the shorter list.
Keeping 3 items from the end of that example yields `c,d,e`. Keeping 3 from the start yields `a,b,c`.
Privacy and edges
A length of 0 produces an empty result. A length larger than the list leaves it unchanged. The text is not uploaded.
Frequently asked questions
Is this the same as truncating text to a character count?
No. This page counts list items, not characters. Use the text truncate tool for a character limit.
Is the list uploaded?
No.
Can I keep the last 10 lines of a log?
Yes. Split on newlines, set the length to 10, and keep the end.
Must the length be a whole number?
Yes. It must be a number of 0 or more.
More List Tools
- Chunk List – Split a list into fixed-size chunks
- Duplicate – Duplicate list items with specified criteria
- Find most popular – Find most frequently occurring items
- Find unique – Find unique items in a list
- Reverse – Quickly reverse a list
- Rotate – Rotate list items by specified positions
- Shuffle – Randomize the order of list items
- Sort – Sort list items in specified order
- Unwrap – Unwrap list items from structured format
- Wrap – Wrap list items with specified criteria