Find Longest List Item
Show the item with the most characters, and its length.
What this page computes
Paste a list and the page prints the item with the greatest number of characters, then its length and the size of the list. Length is counted in code points, so an emoji counts as one character rather than as two UTF-16 units.
Where it stops
A tie goes to the item that appears first, which the page does not report separately, so two equally long items always resolve the same way. Blank lines are skipped and an empty box is refused rather than answered with an empty item.
Why the answer repeats
The comparison is a loop over the pasted lines in this tab. Nothing is uploaded and the same list always names the same item.
Prints the longest item in a pasted list with its code-point length and the list size. Ties go to the first item; blank lines are skipped and an empty box is refused.
How to use it
Paste the list and press Run. The first line is the item and the second its length.
The arithmetic
Code points are counted with Array.from, so a surrogate pair is one character. The comparison keeps the first maximum, which is what makes the tie rule deterministic.
What to Expect
Best for
- finding the label that will overflow
- measuring a list's widest entry
What this tool keeps
- the longest item and its length
Sample input
apple / banana / fig
Sample output
banana Length = 6 character(s) in a list of 3 item(s).
Frequently asked questions
How do I use the find longest list item page?
Paste the items and press Run. The first line is the longest one.
Is anything uploaded?
No. The whole calculation runs in this tab with JavaScript: no request is made, no account is needed, nothing is stored, and the page keeps working offline once it has loaded.
What are its limits or bounds?
At least one non-blank line must be present. Length is counted in code points, and a tie must resolve to the first such item.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.