Sort Lines
What is a Sort Lines?
Sort and reorder lines of text alphabetically (A-Z or Z-A), numerically (1, 2, 10), by line length, or randomly.
Why Use This Tool?
- List Organization: Alphabetize names, keywords, domain lists, or code imports.
- Numeric Ordering: Sort numeric data correctly so 2 comes before 10 (Natural Numeric Sort).
- Code Refactoring: Sort CSS properties or JavaScript import statements alphabetically.
How to Use
- Paste your list of lines into the editor.
- Choose sort criteria: Alphabetical, Natural Numeric, Line Length, or Random Shuffle.
- Copy the sorted list.
Real Working Example
Input Text:
banana 10 apple 2
Output Result:
Natural Numeric / Alphabetical Sort: 2 10 apple banana
Important Technical Details & Features
- Intl.Collator Natural Sorting: Uses `Intl.Collator(undefined, { numeric: true })` for human-intuitive number ordering (2 < 10).
- Case Sensitivity Toggle: Option to sort case-sensitively or case-insensitively.
- Deduplication Combo: Option to remove duplicate lines while sorting.
Related Text & Developer Utilities
- Remove Duplicate Lines: Deduplicate text lists.
- Line Shuffler: Randomly shuffle line order.
- Line Numbering: Add line numbers to lists.
Frequently Asked Questions
What is Natural Numeric Sorting?
Natural sort orders numbers intuitively (1, 2, 10) instead of standard ASCII sort (1, 10, 2).
Can I sort lines by character length?
Yes, select "Sort by Line Length".
Can I reverse the sort order (Z to A)?
Yes, check "Reverse Order".
Is it free?
Yes, 100% free.
What is the main function of Sort Lines?
Sort text lines alphabetically (A-Z / Z-A), numerically, by line length, or randomly with deduplication options. This tool processes sort lines data 100% locally inside your web browser.