Free • Private • No signup

Sort Lines Online

Sort any list of lines online for free. Order A to Z, Z to A, by number or by length, shuffle, and remove duplicates or empty lines, all in your browser without uploading your text.

Text never uploadedLive resultsWorks offline once loaded
Lines in0
Lines out0
Characters0
Removed0

Input

Result

How to sort lines

Three quick steps, no account needed.

Paste your listPut one item on each line. Type it in or paste from a spreadsheet or document.
Pick an orderChoose A to Z, numeric, by length and more. Add clean-up options if you need them.
Copy the resultThe sorted list updates live. Press Copy result and paste it where you need it.

Why use this tool

Built for speed, privacy and tidy lists.

Private by designYour text is processed on your device and never uploaded.
Smart orderingNatural and numeric sorting put file2 before file10 and 2 before 10.
Live resultsThe result changes as you type or change a setting.
Clean while you sortRemove duplicates, empty lines and extra spaces in the same step.

About sorting lines

What each order does and when to use it.

What does sorting lines mean?

Sorting lines rearranges a list so each line sits in a chosen order. The tool treats every line break as the end of one item, so it works for names, keywords, URLs, file names, product codes and any other one-per-line list.

Which order should you pick?

  • A to Z or Z to A for words and names.
  • Natural for file names or codes with numbers inside, such as img2 and img10.
  • Numeric for lists that are only numbers, including decimals and negatives.
  • By length to find the shortest or longest entries.

Clean up at the same time

Tick Remove duplicates to keep one copy of each line, Remove empty lines to drop blanks, and Trim spaces to ignore stray spaces at the start and end. Next you may want to turn your titles into URL slugs with the slug generator.

Sort orders compared

The same list, ordered three ways.

OrderInput: 10, 2, 1, b, aBest for
A to Z1, 10, 2, a, bWords and names
Natural1, 2, 10, a, bFile names with numbers
Numeric1, 2, 10, a, bLists of numbers
Longest first10, 2, 1, b, aFinding long entries

Frequently asked questions

Quick answers.

Is my text uploaded anywhere?

No. Sorting runs inside your browser. Your text never leaves your device.

What is the difference between A to Z and natural sort?

A to Z compares text character by character, so file10 comes before file2. Natural sort reads the digits as numbers, so file2 comes before file10.

How do I sort numbers correctly?

Choose the Numeric order. Lines are compared by their number, so 2 comes before 10. Lines that are not numbers are placed at the end.

Does sorting ignore uppercase and lowercase?

Yes, by default. Untick Ignore case if you want capital and small letters treated as different, which also changes how duplicates are matched.

Can I remove duplicate lines?

Yes. Tick Remove duplicates and only the first copy of each line is kept. The Ignore case setting decides whether Apple and apple count as the same line.

Is there a limit on how long the list can be?

Nothing is uploaded, so there is no server-side limit. The practical limit is your device memory. For extremely long lists, sort in smaller groups.

More tools

Related text and data tools.