Cookies This site keeps only what it needs to work. There is no analytics and no advertising on it today, and nothing here follows you to other sites. Read the privacy policy

Choose what to allow
+92 312 8299940Free Quote
Free tool, works in your browser

Text Sorter
Sort Lines Alphabetically, by Number or by Length

Paste a list into this text sorter and get it back in order at once: A to Z, 2 before 10, by value, by length, by column or shuffled.

  • FreePrice
  • SixSort modes
  • NoneSign-up
  • In your browserRuns

Text Sorter

Sort lines alphabetically, by number, by length or at random

Items in
0
Items out
0
Duplicates removed
0
Empty lines removed
0

Ready. Paste a list and the sorted version appears beside it.

Your browser does all of the work here, in this tab. We upload nothing, store nothing and log nothing.
The basics

Jobs This Text Sorter Handles for You

This text sorter works online and puts any list in order the moment you paste it. Names, keywords, file names, prices, tags or whole CSV rows all work, and the sorted copy appears right beside the original.

You choose the rule. Sort alphabetically, sort so that 2 comes before 10, sort by the number inside each line, sort by length, or shuffle the list at random. After that, copy the sorted list or save it as sorted.txt.

The sorting happens in your browser, which keeps the list on your own device. That matters when the list holds customer names, email addresses or anything else you would rather keep to yourself.

How Alphabetical Order Really Works

Sorting text looks simple until accents, capitals and other alphabets show up. A plain computer sort compares character codes, so every capital letter lands before every small one, and é falls after z.

The same list of file names sorted four ways: A to Z, naturally, by length and Z to A
One list, four orders. Each sort mode answers a different question.

This tool uses the browser’s own Intl.Collator instead. It knows the alphabet of each language, so apple and Apple sit together, and Éclair lands among the other words that start with e.

Sort Lines Alphabetically

Paste one item per line and pick Alphabetically. The list comes back from A to Z at once, and Z to A takes one more click. Because the sort is stable, lines that count as equal keep the order you gave them.

Text sorter putting a mixed list of fruit and file names into alphabetical order with checks below
Paste a list and the sorted copy appears beside it.

Two switches change what counts as equal. Ignore capitals treats Apple and apple as the same word, and Ignore accents does the same for café and cafe. Both help most when you also remove duplicates.

Natural Sort for Numbers Inside Text

A plain A to Z sort reads digits one at a time, so File 10 lands before File 2. That is correct for a computer, yet it looks wrong to every person who reads the list.

Natural sort putting File 1, File 2 and File 10 in counting order instead of character order
Natural sort reads 10 as ten, not as a one and a zero.

Natural sort fixes this by reading each run of digits as one number. As a result, File 1, File 2 and File 10 come out in the order people count. The idea has a long history under the name natural sort order, and file managers use it for exactly this reason.

Sort by Number, by Length or at Random

By number value looks for the first number in each line and sorts on it. It understands minus signs, decimals and both 1,234.50 and 1.234,50, so prices and measurements sort correctly. Lines without any number move to the end, and the checks table tells you how many.

By length puts the shortest lines first, which helps when you trim a keyword list or look for the longest titles. Meanwhile, In random order shuffles the list with your browser’s secure random generator, so every order is equally likely. Press Shuffle again for a new draw.

Sort a CSV by One Column

Choose One column under Compare, then pick the column number and the character that splits it: comma, tab, semicolon, pipe or space. The sorter reads quoted CSV fields properly, so a value like "Smith, John" stays in one piece.

CSV rows sorted by the number in their third column while the header row stays on top
Sort rows by any column and keep the header in place.

Combine this with By number value to rank rows by price, score or date. In addition, tick Keep the first line on top, and the header row stays where it belongs while the data below it moves.

Ordering People by Surname

Pick The last word under Compare, and Ada Lovelace sorts under L, not under A. This works for guest lists, author lists and team pages, where people expect surnames in order.

How Swedish, German, Spanish and Arabic Sort Letters

Languages disagree about the alphabet. Swedish puts å, ä and ö after z, while German files ä next to a. Spanish keeps ñ as its own letter after n, and Arabic has an order of its own.

The Alphabet menu follows the page language by default, and you can switch to English, Spanish, German, French, Italian, Arabic or Swedish. Under the hood, the rules come from the Unicode Collation Algorithm, the same standard that databases and operating systems follow.

Character Codes, Like the Unix sort Command

Sometimes you need the strict computer order instead, for example to match the output of sort on a server or to compare two lists line by line. Choose Character codes, and capitals come before small letters, exactly as LC_ALL=C sort does.

Repeats, Empty Rows and Extra Spaces

Lists copied from elsewhere are seldom tidy. Therefore the sorter trims spaces and drops empty lines by default, since both would otherwise float to the top. Untick either switch whenever you need the list exactly as it came.

Switch on Remove duplicates, and only the first copy of every entry stays. For a tool that removes repeats without sorting at all, and even shows how often each one appeared, try our duplicate line remover.

Checks That Explain the Result

Below the result, a short checks table explains anything that might surprise you. For example, it warns when an A to Z sort put item 10 before item 2 and suggests natural sort instead.

It also counts lines without a number in number mode, rows that lack the chosen column, and repeated items you kept. So when an order looks odd, the reason sits one glance away.

Where People Use a Text Sorter

SEO teams alphabetize keyword lists before they group them. Teachers sort class lists by surname, and developers sort imports, config keys and word lists. Writers, on the other hand, use random order to pick names, prompts or the order of speakers.

Shop owners sort product feeds by price, while researchers sort survey answers by length to find the detailed ones first. In every case, the list goes in messy and comes out in the order the job needs.

Tips for Clean Sorting

Put one item per line before you sort. If your list sits in a paragraph with commas, switch Items to Split by commas instead. Also, fix odd capitals first with our case converter, so similar words line up.

When the order matters to a reader, check the result once by eye. Finally, count the items with our word counter, or compare two versions of a list with the diff checker.

Four steps

Sorting Text Alphabetically on Denwix

The output refreshes with every key you press, so there is no sort button.

  • 1

    Paste your list

    One item per line, or open a text or CSV file.

  • 2

    Pick the sort

    Alphabetically, naturally, by number, by length or at random.

  • 3

    Set the details

    Direction, column, alphabet, duplicates and blank lines.

  • 4

    Copy or download

    Take the sorted list as text or as a .txt file.

Why this one

More Than A to Z

Most sorters only know one order. This one knows six, and it explains every result.

  • Six sort modes

    Alphabetical, natural, number, length, random and reverse.

  • Real alphabets

    Accents and letters sort the way each language expects.

  • Columns and surnames

    Sort CSV rows by any column, or names by the last word.

  • Clean-up built in

    Clean up spaces, empty rows and repeats in one go.

  • Fast on big lists

    Hundreds of thousands of lines sort in a second or two.

  • Private

    The list you paste stays inside your browser.

Good habits

Tips for Sorting Lists

Small habits that make every sort come out right.

  • One item per line. Or pick the comma or space split to match your list.
  • Sort numbers the natural way. It keeps 2 before 10 in names, versions and file lists.
  • Pick the right alphabet. Swedish, German and Spanish each place some letters differently.
  • Hold the header row in place. Tick the switch before you sort a CSV file.
  • Remove duplicates last. Decide first whether capitals and accents count.
  • Read the checks. They explain any line that ends up in a surprising place.
Common slips

Six Mistakes When Sorting Text

Each one leaves a list in an order nobody expected.

  • Sorting numbers as text

    Item 10 then lands before item 2. Use natural or number mode.

  • Leading spaces

    A line that starts with a space jumps above every letter.

  • Mixed capitals

    In code order, Zebra comes before apple. Pick an alphabet instead.

  • Sorting the header row

    The column names end up in the middle of the data.

  • Wrong alphabet

    Å sorts after Z in Swedish but next to A in English.

  • Removing near-duplicates by accident

    With Ignore capitals on, Polish and polish count as one.

Questions

Text Sorter Questions People Ask

What are the steps to alphabetise a list on Denwix?

Drop your list into the left-hand Denwix box, one entry on each line. The sorted list appears at once in the second box.

How do I sort from Z to A?

Set Direction to Z to A. The same switch reverses number and length sorts too.

Why does a plain A to Z sort put 10 ahead of 2?

A plain text sort reads one digit at a time. Choose Naturally (2 before 10) and numbers sort by value.

Will the sorter order CSV rows by one column?

Yes. Pick One column, then the column number and the separator. Quoted fields stay whole.

Can I sort names by surname?

Yes. Pick The last word under Compare, and each name sorts on its final word.

Can the text sorter handle é, ñ, ä and other letters correctly?

Yes. Choose an alphabet, and letters such as é, ñ, ä and å land where that language expects them.

Will the sorter drop repeats in the same pass?

Yes. Tick Remove duplicates. It keeps the first copy of each item and reports how many it dropped.

Is the Denwix shuffle truly random?

It uses your browser’s secure random generator, so every order has the same chance.

How many lines can the Denwix sorter take?

The Denwix sorter handles 200,000-line lists in about two seconds. Files up to 8 MB open straight into the box.

Is my list uploaded?

No. The sorting happens in your browser, and nothing leaves the page.

More free tools

More Tools for Lists and Text

Handy next steps once your list is in order.

  • Duplicate Line Remover

    Drop repeated lines and see how often each appeared.

    Open tool →
  • Case Converter

    Move text between capitals, small letters, title style and sentence style.

    Open tool →
  • Diff Checker

    Compare two lists and see every change.

    Open tool →

Ready to Sort Your List?

Paste it and the sorted copy appears at once. This text sorter is free, needs no account and works in your browser.