Skip to content
Kordu Tools Kordu Tools

Sort Lines

Runs in browser

Sort lines alphabetically, by length, numerically, or randomly. Optionally remove duplicates.

Last updated 08 Apr 2026

Paste any text and sort its lines alphabetically A-Z or Z-A, by line length shortest-to-longest or longest-to-shortest, numerically, or randomly shuffled. Optionally enable case-insensitive sorting and remove duplicate lines. Runs entirely in your browser — nothing is uploaded.

Result
Loading rating…

How to use

  1. 1

    Paste your lines

    Paste or type a list of items in the input box, one item per line.

  2. 2

    Choose a sort method

    Click A→Z or Z→A for alphabetical, Shortest/Longest for length-based sorting, Numeric to sort by number value, or Shuffle to randomise the order.

  3. 3

    Configure options

    Enable case-insensitive sorting if capitalisation should not affect order. Enable Remove duplicates to eliminate repeated lines.

  4. 4

    Copy the result

    Sorted lines appear instantly in the output box. Click Copy to send them to your clipboard.

Frequently asked questions

How does alphabetical sorting handle accented characters?
Sorting uses JavaScript's localeCompare, which correctly handles accented characters (é, ñ, ü, etc.) according to the user's locale. Accented letters sort near their base letter rather than at the end of the alphabet.
How does numeric sorting work?
Numeric sort parses the value at the start of each line as a floating-point number and sorts by that value. Lines that do not start with a number are sorted to the end. Useful for sorting lines like '10 items', '2 items', '100 items' in true numeric order.
What does case-insensitive sorting do?
Case-insensitive mode converts all text to lowercase before comparing, so 'Apple', 'apple', and 'APPLE' sort together. The original capitalisation is preserved in the output — only the comparison is normalised.
Can I shuffle and then reshuffle?
Yes. After selecting Shuffle, a Reshuffle button appears. Click it any number of times to generate a new random order each time.
Does Remove duplicates work with case-insensitive sorting?
Yes. When both options are enabled, 'Apple' and 'apple' are treated as duplicates and only the first is kept.
Is my text uploaded or stored?
No. All sorting happens in your browser using JavaScript. Your text never leaves your device.

The Kordu Sort Lines tool gives you six ways to reorder the lines in any

block of text. Alphabetical A-Z and Z-A are the most common — they use

locale-aware comparison so accented characters sort correctly. Length sorting

(shortest first or longest first) is useful for organising keyword lists,

URLs, or any data where line length is meaningful. Numeric sorting parses

the numeric value at the start of each line and sorts by that, ignoring

non-numeric lines to the end. Shuffle randomly reorders lines — click

Reshuffle to generate a new random order.

Case-insensitive mode treats uppercase and lowercase as equivalent during

comparison, so "Apple" and "apple" sort together. Remove duplicates eliminates

repeated lines (after sorting, so you always keep the first alphabetically

or first in natural order).

Common uses: sorting word lists, URLs, email addresses, and domain names;

alphabetising bibliography entries; randomising quiz answer options; sorting

numerical data without a spreadsheet; and organising exported lists.

All processing runs client-side in your browser. Your text is never uploaded,

stored, or transmitted to any server.

Related tools