Loading the interface. JavaScript is required; controls stay disabled until ready.
Paste or type the text you want to work with.
Run the tool to generate your result here.
Input and output are limited to 1,000,000 UTF-16 units. Line operations support up to 20,000 lines; Compare is limited to 250,000 line pairs. Results remain plain text in your browser.
How Text Sorter works
Sorting uses English locale collation, not a raw byte order. Natural order places item2 before item10. Equal comparisons retain their original order. Blank lines participate in sorting.
How to use this tool
- Paste or type text into the labelled input.
- Select alphabetical, reverse alphabetical or natural number ordering, then select Process text.
- Review the output, then copy it. Reset clears the current inputs and result.
Processing happens locally. Text is not uploaded or saved by this tool. Keep a separate copy before leaving the page.
A practical example
Choose natural ordering for item10, item2, item1 to get item1, item2, item10.
Questions and answers
Is ordering identical for every language?
No. This tool uses English collation. Browser Unicode versions may differ for unusual characters.
What is natural sort order?
Natural sorting treats runs of digits as whole numbers, so 9 comes before 10 and item2 comes before item10. Plain alphabetical sorting compares character by character, which puts 10 before 9. Natural order suits file names, versions and numbered lists; alphabetical order suits names and words.
How are accented letters and capitals sorted?
The sorter uses English language rules rather than raw computer codes, so é sorts with e and capital letters sit next to their lowercase versions. German umlauts such as ä and ö are placed with a and o. Dictionary conventions in German or Swedish differ slightly, so check the result for lists in those languages.
Can I sort by number or by line length?
Natural mode sorts numbers correctly when they appear in the text, so prices or IDs at the start of each line will order numerically. Sorting by line length is not a mode here. For column-based sorting in a table, a spreadsheet such as Excel or Google Sheets is a better fit.
Sort a list alphabetically or by natural order
Choose a text sorter when every newline represents one complete entry. Alphabetical and natural ordering answer different questions: a dictionary-like list compares text, while a numbered file list usually needs the numbers inside labels compared numerically.
A practical example
Paste item10, item2 and item1 on separate lines. Natural ordering produces item1, item2, item10. Ordinary text ordering can put item10 before item2 because it compares digit characters instead of treating the whole digit sequence as a number. Choose the mode that matches how the list will be read.
Prepare one item per line
A comma-separated sentence is still one line here. Split the entries deliberately before sorting; the tool does not parse CSV fields or preserve a spreadsheet header separately. Blank lines take part in the sort, and equal comparisons preserve their original relative order. Duplicates remain unless you remove them in a separate operation.
Understand the comparison rules
This tool uses English locale collation rather than raw byte values. Ignore letter case when capitalization should not decide order. Accents and unusual Unicode characters can sort differently across browser versions or languages. Check representative entries, especially names, before replacing an important source list. Sorting changes order, not spelling or meaning.
Worked example: sorting file names
A folder export lists chapter1.docx, chapter10.docx, chapter2.docx and Chapter3.docx. Alphabetical sorting gives chapter1, chapter10, chapter2, Chapter3, because it compares one character at a time. Natural sorting gives chapter1, chapter2, Chapter3, chapter10, which is how a person would number them. Locale-aware comparison also keeps capitalised names next to their lowercase neighbours instead of grouping all capitals first.
Choose your next task
- Line counter: Check the number of entries and blank rows.
- Prefix and suffix tool: Wrap each ordered item after sorting it.
- Remove duplicate lines: Deduplicate a sorted list using explicit matching rules.
- Text reverser: Keep Unicode character reversal separate from token and line reversal.