Skip to content
Text Tools

Why "Item 10" Sorts Before "Item 2" in Some Tools (and How Natural Sort Fixes It)

August 4, 2026 Admin 2 min read

Sort a list containing "Item 1", "Item 2", ... "Item 10", "Item 11" alphabetically and you'll often get "Item 1, Item 10, Item 11, Item 2, Item 3...". That's not a bug — it's exactly what character-by-character alphabetical sorting is supposed to do, and it's the wrong tool for a list that contains numbers.

Why plain alphabetical sort does this

A basic alphabetical (lexicographic) sort compares text one character at a time, the same way a dictionary orders words. Comparing "Item 10" to "Item 2" character-by-character, the comparison reaches the digit "1" vs. "2" at the same position and "1" sorts before "2" — so "Item 10" wins, even though 10 is numerically larger than 2. The sort has no concept that "10" is a two-digit number; it just sees the characters "1" then "0".

What "natural sort" does differently

Our Text Sorter uses natural sort order, which recognizes runs of digits as numbers rather than as individual characters — so it correctly places "Item 2" before "Item 10", matching how a person would actually expect a list like that to be ordered. It's also case-insensitive, so "apple" and "Apple" sort next to each other rather than being split apart by capitalization.

Ascending and descending

Both directions use the same natural, case-insensitive comparison — descending isn't a separate sort, it's the same order reversed, so numbers and case behave consistently either way.

A note on blank lines

Empty lines in your input are dropped rather than sorted to the top or bottom — useful if your list has stray blank lines from copy-pasting, since they won't clutter the result.

Using the tool

Paste a list — file names, version numbers, IDs, anything mixing text and numbers — and choose ascending or descending. Try it here: Text Sorter.

Text Tools

Cleaning Messy Lists: How to Remove Duplicate Lines Without Excel

Deduplicating a list of emails, keywords, or log entries doesn't need a spreadsheet — but it does need to know exactly what counts as a "duplicate."

Aug 1, 2026 Read More
Text Tools

UPPERCASE, Title Case, Sentence Case: When to Actually Use Each One

The four common case styles aren't interchangeable — here's what each one is actually for, and the fastest way to fix text that was typed in the wrong one.

Jul 29, 2026 Read More
Text Tools

Character Limits That Actually Matter: SMS, X/Twitter, Meta Descriptions, and More

A practical reference for the character limits you actually run into — texts, tweets, meta descriptions, title tags — and which ones count spaces.

Jul 26, 2026 Read More