All Tools

List Editor: Filter, Slice, Rotate, Count and Pick Items

Edit a list of items in your browser: delete empty or repeated items, filter, find, replace, slice, rotate, group, duplicate, count the most frequent items, pick random items or build custom lists. Nothing is uploaded.

Input separator
Output separator

0 characters, 0 bytes

0 characters, 0 bytes

To sort or shuffle a list, use the List sorter.


About the List Editor

The List Editor applies one operation at a time to a list of text items. Paste a list, choose an operation, and the edited list appears beside it with Copy and Download .txt buttons. There are twenty-one operations in five groups: clean up (delete empty items, delete consecutive repeats, delete items by text, pattern or position, replace items), select (filter, find, slice, truncate), reshape (append, change length, duplicate, group, rotate, reverse, make symmetric), count (length, most frequent items, statistics) and create (pick random items, random lists, numbered lists from a template). Lists of up to 100,000 items are handled in your browser, and nothing is uploaded.

How to use it

Steps

  1. Choose an Operation. The page opens on Delete empty items; each operation shows its own settings underneath.
  2. Pick the Input separator that divides your items: new line, comma, semicolon, tab, space or a custom string. The Output separator can differ, which also converts between list formats.
  3. Paste or type the list. The output and a short note such as "12 items" update as you type.
  4. Copy the result or download it as a text file. To apply a second operation, paste the output back into the input.

Privacy

Every operation runs in code on this page. Your list is never sent to our servers and is forgotten when you close the tab.

The operations

Clean up and select

Delete empty items removes items that are empty or contain only spaces. Delete repeats collapses runs of the same item that sit next to each other and keeps one, so a, a, b, a becomes a, b, a. Delete items removes items by exact text, by containing a text, by a regular expression, or by a position list such as 1,3,5-7. Filter keeps items that contain, start with or end with a text, match a regular expression, or have a length in a range, and Invert keeps the others. Find items lists each match with its position. Slice keeps the items between two positions; negative positions count from the end, so -1 is the last item. Truncate keeps the first or last n items.

Reshape

Append adds items at the start or the end. Change length cuts the list to n items or extends it by cycling the list, repeating the last item or adding a fill value. Duplicate repeats the whole list, or each item in place, n times. Group joins every n items into one line with a glue such as ", ". Rotate moves items left or right by n places, wrapping round. Reverse turns the list end to end, and Create symmetric list mirrors it, so a b c becomes a b c b a, or a b c c b a with the middle repeated.

Count and create

Count items reports the number of items, non-empty items, unique items and characters. Most frequent items ranks items by how often they occur, optionally ignoring letter case. List statistics adds the shortest and longest item, the average length and the number of empty items. Pick random items draws one or more items, with or without repeats. Create random list draws n items from your list, or from built-in words or a number range when the input is empty. Create custom list fills a template such as Item {n} for every number from a start to an end in a chosen step.

Related tools

Sorting and shuffling are handled by the List Sorter. To keep one copy of every value wherever it appears, use the Duplicate Remover; for sums and averages of a list of numbers, the Number List Calculator. The Random Item Picker and List Statistics pages open this editor on those operations.

Open-source credits

All operations are implemented in-house in TypeScript, with no third-party library. Random draws use the Web Crypto API with rejection sampling, and picks without repeats follow the Fisher–Yates shuffle (Durstenfeld's in-place version), stopped after the requested number of items.

Frequently asked questions

How does the list editor decide where one item ends and the next begins?

It splits the input with the input separator you choose: a new line by default, or a comma, semicolon, tab, space or any custom text. Spaces around each item are trimmed unless you turn trimming off, and the result is written with the separate output separator, so you can also convert a comma list into lines.

What is the difference between deleting repeats and removing duplicates?

Delete repeats only collapses runs of the same item that sit next to each other, so a, a, b, a becomes a, b, a. To keep a single copy of every value wherever it appears, use the Duplicate Remover instead, which compares each item with the whole list.

How do negative positions work when slicing a list?

Positions start at 1 for the first item. A negative position counts back from the end, so -1 is the last item and -2 the one before it. Slicing from -3 with an empty end therefore returns the last three items, and a start after the end returns an empty list.

Are the random picks and random lists fair?

Yes. Each draw comes from the browser's cryptographic random generator, and rejection sampling removes the small bias a plain remainder would give. Picks without repeats use a partial Fisher–Yates shuffle, so every item and every order is equally likely. Nothing is drawn until you type a list or press the button.

Why does the editor refuse a list that is very long?

Lists are limited to 100,000 items, both when you paste them and when an operation such as duplicate, change length or custom list would grow the result. The limit keeps the page responsive on phones; split a larger list into parts and edit each part in turn.

Can I sort or shuffle a list here?

Sorting and shuffling live in the List Sorter, which orders items alphabetically, naturally, numerically or by length and can shuffle them. The list editor covers every other change: filtering, slicing, rotating, grouping, replacing, counting and creating lists, so the two tools are designed to be used together.

Other related tools