Metric | Value |
---|---|
{{ row.label }} | {{ row.value }} |
Sorting strings is a fundamental text-processing task that arranges lines into a predictable order, enabling quicker scanning, comparison, and downstream automation. Alphabetical, natural, length-based, and randomised sequencing each address different editorial or analytical needs.
This browser-only utility accepts any pasted text or uploaded file, trims or preserves formatting as directed, then applies your chosen ordering while optionally culling blanks and duplicates. A reactive engine updates the output and statistics live as you adjust settings.
Use it to tidy log snippets before diffing, alphabetise mailing lists, or shuffle brainstorming ideas for unbiased reviews. *Always verify critical files after automated edits for unintended truncation or oversight.*
Lexicographic ordering compares Unicode code points; natural ordering blends lexical comparison with embedded number awareness; length ordering ranks by character count. A locale-aware collator normalises case when requested, guaranteeing consistent results across language settings.
\n
.Sort mode | Comparator focus |
---|---|
Alphabetical A-Z / Z-A | Unicode code-point order |
Natural A-Z / Z-A | Numeric substrings interpreted as integers |
Length | Ascending character count |
Reverse | Original list reversed |
Shuffle | Fisher–Yates-style random swap |
Example (natural A-Z, case insensitive):
Line2
Line10
line1
→ line1
Line2
Line10
Locale-aware comparison follows the Unicode Collation Algorithm (UTS-10) and the ECMAScript Internationalisation API specification. Natural sort behaviour aligns with human-friendly list ordering discussed by Alphanum research and ISO 80000-1 section 3.1.
All processing occurs client-side; no personal data leaves your device.
Follow these concise steps to transform any text block.
No. Everything runs within your browser session; nothing is transmitted.
Yes, ordering follows your locale’s collation rules, though results may vary for unrecognised scripts.
Natural sorting treats embedded numbers as integers, so “file2” appears before “file10”.
Ensure Delete duplicate lines is enabled and case sensitivity set correctly for your text.
It uses Math.random()
, suitable for casual tasks but not for security-critical randomisation.