Sort text alphabetically

Paste a list, get it sorted A to Z. The "Sort lines" step is already queued up below — switch its order, or add more steps to clean the list up first.

Your text never leaves your browser.

Pipeline

Add one or more steps below. They run top to bottom, live, and you can reorder or remove any of them.

    No steps yet — add one above, or try an example that already has a few queued up.

    Result

    Five ways to sort a list of lines

    Plain alphabetical sort compares lines character by character, which is exactly right for names and words but produces a surprising order for anything with embedded numbers:file10 sorts before file2, because "1" is less than"2" regardless of what comes after it. Natural sort fixes this by reading the embedded number as a number — the option to reach for whenever you're sorting filenames, version strings, or a numbered list.

    Numeric sort is different again: it ignores everything except the leading number on each line and sorts by that, which suits a list where the meaningful order is a quantity written at the start of the line ("42 units", "7 remaining") rather than the line's text as a whole. Sort by length ignores content entirely and orders shortest to longest — useful for spotting outliers in an otherwise uniform list. Case-sensitive sorting (off by default) separates "Apple" from "apple" instead of treating them as equivalent.

    Text Cleaner

    The full pipeline: dedupe, sort, strip, and extract, stacked into one ordered set of steps.

    Remove Duplicate Lines

    Keep the first or last occurrence of each line, optionally case-insensitive.

    Case Converter

    Convert between UPPERCASE, Sentence case, Title Case, and programming cases.

    Remove Line Breaks

    Join wrapped lines back into paragraphs, with paragraph breaks kept intact by default.