{{ summaryTitle }}
{{ summaryValue }}

{{ summaryLine }}

Source{{ resultsReady ? computation.values.source_count : '—' }} Unique{{ resultsReady ? computation.values.unique_count : '—' }} Locale{{ resultsReady ? computation.values.resolved_locale : '—' }}
{{ summaryAnnouncement }}
Text sorting controls
Enter one list. Choose the matching input separator below before trusting the item count.
{{ sourceMeta }}
{{ sourceActionHint }}
Use New line for one-item-per-line lists; use another boundary only for simple token streams.
Natural A–Z is usually best for filenames such as File2 and File10.
Enter a reusable seed or leave blank for a browser-generated run.
{{ shuffleSeedHint }}
{{ case_sensitive ? 'Uppercase and lowercase remain distinct.' : 'Uppercase and lowercase share one comparison key.' }}
{{ case_sensitive ? 'Case-sensitive' : 'Case-folded' }}
Use a BCP 47 tag such as en-US, fr, de, es, ja, or sv.
New line keeps list items separate; other separators create a paste-ready token string.
{{ setting.help }}
{{ params[setting.param] ? 'On' : 'Off' }}
Leave blank to keep every item that passes the other rules.
Leave blank to exclude nothing by plain-text matching.
Keep No regex filter unless a structured pattern is necessary.
Leave blank for no prefix; use “- ” for a Markdown bullet list.
Leave blank for no suffix.
{{ line_numbers ? 'Final output items receive sequential numbers.' : 'Output items keep their text without indexes.' }}
{{ line_numbers ? 'On' : 'Off' }}
This setting does not change sorting or the item ledger.
{{ outputExportAnnouncement }}
{{ computation.values.output_text }}
{{ chartExportStatus }}

The chart renderer is unavailable. Item lengths remain available in the sort ledger.

{{ ledgerExportStatus }}
OrderSorted itemCharactersCopy
{{ row.order }}{{ row.item }}{{ row.length }}

Ordering a list is really a decision about what counts as one item and which differences matter. A set of filenames may need embedded numbers treated as numbers, a reading list may ignore leading articles, and a multilingual name list may need a language-specific alphabet rather than raw character order.

The separator comes first because it defines the records. Newlines preserve phrases naturally. Commas, semicolons, tabs, and spaces are useful for simple token streams, but they can split meaningful text when those characters also occur inside an item. A file named CSV is not automatically a structured table; quoted commas and multi-column rows require a real CSV parser, not a plain text boundary.

  • Alphabetical order compares text according to the selected locale and case sensitivity.
  • Natural order treats digit runs numerically, so File2 comes before File10.
  • Length order puts shorter items first and uses alphabetical comparison to break equal-length ties.
  • Reverse flips the current item sequence without applying an alphabet.
  • Shuffle rearranges items from a seed, allowing the same input and seed to repeat the same order.

Cleanup changes the data before comparison. Trimming, number-prefix removal, whitespace collapse, blank removal, text filters, and regular-expression filters may alter both the list and its counts. Deduplication happens after sorting, so it keeps the first item encountered under the active case rule rather than trying to merge similar meanings.

Locale matters most around accents, case, and language-specific letters. The same strings can have different expected positions in Swedish, German, or English. A repeatable result therefore needs the same input boundaries, locale, case setting, cleanup rules, and sort mode. Character-length figures are counts of Unicode code points, not visual width or user-perceived grapheme clusters.

How to Use This Tool:

Define the list boundary before adjusting order or cleanup.

  1. Paste one list into Text to sort, or load one TXT or CSV file up to 2 MiB. Choose the Input separator that matches where each item ends.
  2. Select a Sort mode. Use natural order for numbered names, alphabetical order for ordinary words, length for short-to-long output, reverse for an existing sequence, or shuffle for a seeded arrangement.
  3. Set Case-sensitive comparison and a locale tag such as en-US, de, or sv. Check a few known words when language order is important.
  4. Apply cleanup and filters in the needed order. If a regular expression is selected, provide a compilable pattern and use each flag from gimsuy at most once.
  5. Choose the output separator, newline style, prefix, suffix, or line numbering, then read Sorted text and the source, processed, output, and removed counts before copying the result.

Interpreting Results:

The output count should match the number of items expected after filtering and deduplication. A surprisingly small count usually means the separator split the source incorrectly, an include or regex filter rejected too much, or case-insensitive deduplication merged case variants.

  • Resolved locale is the comparison locale accepted by the browser. An invalid requested locale falls back to en-US.
  • Removed count is source items minus final items, so it combines blank removal, filters, and deduplication rather than identifying one cause.
  • The length profile shows up to the 12 longest final items by Unicode code-point count. Emoji sequences and combining marks may not match what a person perceives as one character.
  • TXT and CSV files are read locally in the browser. No pasted text or file content is uploaded, but copied output becomes available to the system clipboard.

Technical Details:

Text sorting is a staged transformation rather than one comparison call. Each stage consumes the result of the previous stage, so moving a rule earlier or later would change which items survive and which duplicate is kept.

Transformation Core

The transformation follows this exact order:

Ordered text sorting transformation
StageOperationImportant behavior
1Normalize and splitCRLF and CR become LF, then the selected plain-text boundary creates source items. Comma, semicolon, tab, and space modes also split at newlines.
2Clean each itemTrim edges, remove a leading numbered-list marker, and collapse whitespace when enabled.
3FilterRemove blanks, apply include text, exclude text, then a regex include test when selected.
4Compare or shuffleApply locale-aware alphabetical, natural, length, reverse, or seeded shuffle behavior.
5DeduplicateKeep the first sorted item for each active case key.
6Decorate and joinAdd line numbers, prefix, and suffix, then join items with the selected output boundary and newline style.

If filtering removes every item, the transformation stops with No items remain after the selected cleanup and filters. The source accepts at most 10,000 split items and 2 MiB of text. The same limits apply to pasted and file-loaded content.

Rule Core

Alphabetical and natural modes use locale-sensitive comparison. Case-sensitive mode uses variant sensitivity; case-insensitive mode uses base sensitivity. Equal comparisons retain original order, which makes the sort stable. Ignoring leading articles removes A, An, or The from the comparison key only, leaving the displayed item unchanged.

Text sort mode rules
ModePrimary ruleTie or repeat behavior
Alphabetical A–Z / Z–ALocale comparison with numeric handling offOriginal item order breaks equal comparisons
Natural A–Z / Z–ALocale comparison with numeric handling onDigit runs such as 2 and 10 compare numerically
Character lengthAscending Unicode code-point countAlphabetical A–Z breaks equal lengths
ReverseReverse the processed sequenceNo locale comparison
ShuffleSeeded Fisher–Yates shuffleSame processed items and seed repeat the order

A blank shuffle seed is replaced by a generated run identifier. A written seed is hashed to a 32-bit starting value, then a deterministic pseudo-random sequence drives the swaps. This is useful for repeatable ordering, not cryptographic random selection.

Regex include mode accepts only unique flags from g, i, m, s, u, and y. The expression state is reset before testing each item, preventing global or sticky matching from accidentally skipping later records.

Worked Examples:

Numbered filenames

Paste File10, File2, and File1 on separate lines and choose Natural (A–Z). The result is File1, File2, File10. Plain alphabetical order places File10 before File2, which is valid character ordering but usually less useful for filenames.

Cleaning a copied checklist

For items such as 1. The Report, 2. An Update, and a blank line, enable trimming, blank removal, leading-number stripping, and leading-article ignoring. The numbers disappear from the output, while articles remain visible but do not control alphabetical position. Confirm the removed count before using the cleaned list.

References: