Sort Lines

Sort Lines

Sort text lines alphabetically, naturally by embedded numbers, or by grapheme length. Choose direction and optionally remove exact duplicate lines.

Input and results are processed in your browser. This tool does not send or save their contents to a server. Shared site advertising, visitor analytics, and aggregate tool-use measurement may operate separately.

Comments & questions

Sort Lines

Reorder lists with one item per line. Natural sorting places item2 before item10 while preserving each item’s text.

Key features

  • Choose language-aware, natural-number, or grapheme-length sorting.
  • Use ascending or descending order with stable ordering for equal values.
  • Optionally remove exact duplicates without trimming line contents.

How to use

  1. Paste a list with one item on each line.
  2. Choose the comparison, direction, and duplicate handling.
  3. Run the sort, review the result, and copy it.

Use cases

  • Organize numbered filenames
  • Review alphabetized word lists
  • Put short messages first in a review queue

Frequently asked questions

What is natural sorting?

It compares embedded digit runs numerically: item2 comes before item10. Alphabetical mode treats digits as text.

Are spaces removed?

No. Spaces remain part of each line and its comparison value. Lines with different spacing are not exact duplicates.

How is length measured?

Length uses Intl.Segmenter grapheme clusters, keeping supported emoji sequences and combining characters together.

What happens to blank lines?

Real blank lines are sorted too. Exact deduplication merges repeated blank lines. Line endings become LF, while the presence of a final newline is preserved.

Privacy

Input and results are processed in your browser. This tool does not send or save their contents to a server. Shared site advertising, visitor analytics, and aggregate tool-use measurement may operate separately.

Related Tools

Find & ReplaceReverse TextRoman Numeral ConverterDOCX Style AuditorCitation ManagerDocument Search IndexSigned PDF InspectorPDF/A Archival PreflightPrint Preflight AuditorSearchable Scan PDF MakerPublication Accessibility AuditorResearch Evidence MatrixPDF Form DesignerPDF Annotation StudioPDF Object InspectorPDF Outline EditorEPUB Authoring WorkbenchDocument Version ComparatorBooklet Imposition DesignerSensitive Text RedactorHanja Reading WorkbenchGrammar Production LabDialogue Script EditorBook Index BuilderBilingual QA CheckerText Diagram EditorANSI Art StudioEmail Thread ExplorerPDF Redaction StudioRich Text SanitizerFixed Width Record DesignerPresentation Rehearsal StudioText Tokenization LabThree Way Text MergeKorean & English Braille ConverterText to SpeechTyping speed testKorean Text Pattern ReviewKorean Spelling QuizFont Preview and ComparisonHTML to MarkdownMojibake RepairHangul Jamo ConverterKorean Initial ConsonantsAdd or Remove Line NumbersNumber to Korean WordsMorse Code ConverterROT13 & Caesar ConverterURL Slug GeneratorHTML Tag RemoverEmoji CollectionCharacter CounterUnit ConverterFile Size ConverterColor Code ConverterText DiffPDF Merge/SplitBusiness Day CalculatoriCalendar Rule LabvCard Address Book EditorJPG to PDFKorean Name RomanizerOrganize PDF PagesFancy Font GeneratorContrast CheckerColor Palette GeneratorPDF to JPGLorem Ipsum GeneratorText Template WorkbenchKorean-English Typo ConverterText CleanerOnline NotepadWord Cloud GeneratorPDF UnlockEnglish Address ConverterPDF Compressor
Explore all Text/Convert tools →Image/Media →Life/Fun →Dev Tools →