Text Sorter
Put a pasted list in order without removing repeated entries or blank rows. Choose language-aware alphabetical comparison or exact Unicode code-point order, then copy or download the sorted lines.
Organize a line-by-line list
- Paste one entry per line into Original lines. Use example fills an English list containing pear, apple, a second pear and a blank row, selects English alphabetical order and waits for Sort. Nothing is sorted while you type.
- Choose Ascending or Descending. For Alphabetical, select the language of your list, decide whether to ignore letter case and optionally enable Numbers within text. Unicode code-point order does not use those language options. Select Sort when the draft is ready.
- Read the conserved line count and the readonly result. Copy result uses the complete current text; if clipboard access fails, select it for manual copying. Download TXT saves sorted-lines.txt as UTF-8. Editing the draft or an option retires the old result; Clear restores defaults.
Know what controls the order
Alphabetical comparison uses the chosen language in your browser's collator. Ignore letter case affects comparison only: it does not lowercase your text, and accents remain significant. The result shows the effective language when a regional request resolves more broadly, such as Brazilian Portuguese using Portuguese data.
Numbers within text compares decimal-digit runs, so file2 can come before file10. It is not a signed, decimal, scientific-notation or date sorter. Each consecutive decimal-digit run is limited to 254 digits, including zeros. Turning this option off removes that extra input restriction.
Unicode code-point order compares the numeric scalar values of characters, not an alphabet or encoded bytes. A shorter exact prefix comes first in ascending order. This mode is independent of language, case options and browser collation data, but its result can look unfamiliar for names or accented words.
Ties keep their original order in both directions, even when different spellings compare equally. Every occurrence survives. Spaces, tabs, accents, zero-width characters and blank rows are not trimmed, normalized or deduplicated. Only CR and LF line endings are converted to LF, with one LF after every output record.
Examples of retained content and stable ties
The English example pear, apple, pear and a blank row has four input records. Its ascending result begins with the blank row, followed by apple and both pear records. Four lines remain; this tool does not perform duplicate removal.
With Unicode code-point order, a, a blank row and b sort descending to b, a and the blank row. The file ends with two LFs: one ends a and the other preserves the blank record. Omitting that final terminator would lose information.
A precomposed é and an e followed by a combining acute accent are distinct source strings that collate equally. Alphabetical sorting keeps their source order, including when Descending is selected, and does not rewrite either spelling. Code-point order can distinguish them.
Bounds and compatibility
Raw text and its LF-terminated canonical form must each fit 100000 UTF-16 units, with at most 10000 records before sorting. A 100000-unit line without a final LF would need 100001 canonical units and is rejected. These units are not visible-character or UTF-8 byte counts; no draft is shortened to fit.
Malformed UTF-16 is rejected instead of silently replaced during UTF-8 encoding. An actual replacement character and valid supplementary characters remain valid content. An empty draft has zero records; blank-only drafts remain meaningful and exportable when nonempty.
Alphabetical order depends on the browser's language data and can differ across versions or engines. Unsupported language or comparison options produce an error rather than an undisclosed fallback. There is no file or URL input, selected-column or CSV parser, trim, dedupe, shuffle, numeric-value sorter or saved history in this version.
Local list processing
This tool adds no text upload, account, saved history or text-bearing share URL. Download contains the current logical result as UTF-8 with LF endings and no added BOM; an existing U+FEFF stays content. Existing site services are separate, and local operation is not a certification of those services or a secure-erasure guarantee.
Questions about text sorting
Sources
References for ordering and text export.
- tc39.esECMA-402 CollatorDefines language-aware comparison and resolved options.
- unicode.orgUnicode Collation AlgorithmDescribes language-aware ordering and comparison ties.
- tc39.esECMAScript strings and sortingDefines string values, code points and stable sorting.
- encoding.spec.whatwg.orgUTF-8 encodingDefines the encoding used for the downloaded file.
- w3c.github.ioFile API: BlobDescribes binary data used for the download.
Reviewed 5 November 2026; this is not professional or safety approval.
Related tools
JSON to YAML
Convert JSON to YAML locally while preserving number text and quoted strings; copy or download the complete result.
Open tool — JSON to YAMLYAML to JSON
Convert one YAML document locally to JSON with exact number text and bounded aliases, then copy or download the complete result.
Open tool — YAML to JSONHTML to Markdown
Convert pasted or local HTML into Markdown, review conversion notes, and copy or download the result.
Open tool — HTML to MarkdownJavaScript Regex Tester
Test a JavaScript pattern locally and inspect matches, captures, and UTF-16 positions.
Open tool — JavaScript Regex TesterMarkdown to HTML
Convert a Markdown draft to an HTML fragment, inspect the source and inert preview, then copy or download it.
Open tool — Markdown to HTMLRemove Duplicate Lines
Keep the first copy of each exact text line, preserving order, significant spaces and blank rows, then copy or download the result.
Open tool — Remove Duplicate LinesText Diff Checker
Compare two drafts locally, with exact whole-line changes, visible whitespace rules and clear final-newline handling.
Open tool — Text Diff CheckerCase Converter
Convert text to uppercase, lowercase, capitalized words or sentence case with explicit letter rules.
Open tool — Case ConverterHTML Entity Encoder/Decoder
Encode or decode literal HTML references with explicit context, Unicode options and LF output, without parsing or rendering markup.
Open tool — HTML Entity Encoder/DecoderMarkdown Table Generator
Edit a small literal-text table, set alignment and copy GFM Markdown or import tab-separated text.
Open tool — Markdown Table GeneratorQuery String Parser & Builder
Edit ordered URL parameters, retain repeated names and copy a normalized query or HTTP(S) URL.
Open tool — Query String Parser & BuilderURL Encoder & Decoder
Convert a UTF-8 URL component or form value with explicit space and plus rules, then copy or download the result.
Open tool — URL Encoder & DecoderBase64 Encoder & Decoder
Encode UTF-8 text as standard or URL-safe Base64, or decode either format with clear errors and complete text output.
Open tool — Base64 Encoder & DecoderXML Formatter
Check namespace-aware XML 1.0, format or compact locally, and copy or download UTF-8 output.
Open tool — XML FormatterJSON Formatter & Validator
Check JSON syntax, format or minify locally, and copy or download output while preserving original data tokens.
Open tool — JSON Formatter & ValidatorSMS Character Counter & Segment Calculator
See how your message is encoded, where its segments end and what it may cost. Your text stays in your browser.
Open tool — SMS Character Counter & Segment CalculatorSocial Media Character Counter
Check platform-specific limits and split posts without losing text.
Open tool — Social Media Character CounterCharacter Counter
Count characters, words, sentences and paragraphs. Check word density, reading time and UTF-8 size, all in your browser.
Open tool — Character CounterText Size Calculator
Compare text encodings and payload sizes in your browser.
Open tool — Text Size CalculatorPDF Text Cleaner
Fix line breaks and spacing in text copied from a PDF. Preserve your original and review ambiguous hyphens before copying the cleaned text.
Open tool — PDF Text CleanerFancy Text Converter
Convert supported fancy Unicode letters to normal text locally. Keep case, accents, emoji and your original text.
Open tool — Fancy Text ConverterGarbled Text Fixer
Fix garbled text and repair broken accents with a browser-based mojibake fixer. Review each possible UTF-8 reversal before applying it.
Open tool — Garbled Text FixerGmail Clipping Checker
Measure email HTML bytes in UTF-8, compare them with an advisory 102,000-byte Gmail reference, and inspect size contributors locally.
Open tool — Gmail Clipping Checker