Sort Lines
Sort text lines alphabetically, numerically, or using natural order.
text
formatter
A Developer's Guide to the Sort Lines Tool
The Sort Lines tool is a versatile utility for organizing text-based data. It can sort lists of items separated by newlines or commas, offering several sorting methods and options to handle different data types and formatting.
Features
- Multiple Delimiters: Sort lists separated by New Lines or by Commas.
- Flexible Sorting Methods:
- Alphabetical: Standard dictionary sorting.
- Numerical: Correctly sorts numbers (e.g., 2 comes before 10). It smartly handles lines that are not numbers by sorting them separately.
- Natural: A "smart" sort that correctly handles numbers embedded in text (e.g., "z1.doc" comes before "z10.doc").
- Sort Direction: Sort in either Ascending (A-Z, 0-9) or Descending (Z-A, 9-0) order.
- Case Sensitivity: Choose whether the sort should be case-sensitive or not.
- Whitespace Control: Option to ignore leading and trailing whitespace on each item before sorting.
- Real-time Results: The output is updated instantly as you change the text or any of the sorting options.
How to Use
- Paste Your Text: Enter the list you want to sort into the "Input" text area.
- Choose Delimiter: Select whether your items are separated by "New Line" or "Comma".
- Select Sort Method:
- Use the first dropdown to choose your Sort Method (Alphabetical, Numerical, Natural).
- Use the second dropdown to set the Sort Direction (Ascending, Descending).
- Configure Options: Toggle the switches for Case Sensitive and Ignore Whitespace as needed.
- View the Result: The "Sorted Output" text area will display your sorted list.
- Copy: Use the "Copy" button to grab the sorted text.