Case-Insensitive Sort

Options
0 non-empty lines (1 total)
Sorting ignores case for ordering. Duplicates (when enabled) are removed using the same case-insensitive comparison.

How the Case-Insensitive Sort Works

Paste or upload text, then sort it by line while ignoring letter case. Choose A–Z or Z–A, optionally keep only unique lines, and copy or download the result. This page focuses on predictable line sorting, not grammar or language rules.

A–Z
Ascending order
Z–A
Descending order
Ignore case
Apple = apple
Unique
Optional dedupe

What “case-insensitive” means for sorting

When you sort a list of lines, you typically want “Apple” and “apple” to appear next to each other. A case-insensitive sort compares lines using a lowercased version of each line as the primary key. That key is used only for ordering. Your original characters are preserved in the output, so the tool does not rewrite the text into lowercase or uppercase.

This matters when you are working with names, tags, filenames, and pasted lists from different sources. One app might export “Banana” while another exports “banana”. If you do a normal case-sensitive sort, capitalized entries often bunch together, which can look wrong and makes it harder to scan. Case-insensitive sorting reduces that friction by treating capitalization as a display detail rather than a sorting signal.

Deterministic tie-breaking

If two lines become identical after lowercasing (for example, “USA” and “usa”), the sort still needs a stable way to decide which one comes first. This tool uses a deterministic tie-break: it compares the original strings and then falls back to the original input order. That keeps results predictable across repeated runs.

How lines are detected and preserved

The converter works on lines. A line is any text between line breaks. The tool accepts both Windows (CRLF) and Unix (LF) line endings, and it outputs lines separated by LF. Within each line, characters are left as-is. That means punctuation, spacing, tabs, and symbols inside a line are preserved, unless you already removed or changed them before sorting.

Sorting is most useful when each line represents a single item: a keyword, a label, a SKU, a filename, or a row copied from a spreadsheet column. If your text is a paragraph, a line-based sort will scramble the meaning. In that case, use a different tool such as a text cleaner, or split your content into list items first.

  • Empty lines
    Empty lines are treated as real lines. Sorting can move them to the top or bottom depending on direction. If you do not want them, remove them before sorting.
  • Leading spaces
    Leading spaces affect the line’s sort key because they are part of the line. If you want a whitespace-normalized sort, run a cleaner first.
  • Numbers and mixed text
    The tool compares characters, not numeric values. “10” will typically sort before “2” because it starts with 1. For numeric sorting, use a spreadsheet or dedicated numeric sorter.
  • Unicode characters
    Sorting uses your browser’s locale comparison rules. Accents and non-Latin scripts can sort differently depending on environment settings.

Direction and Unique options

The A–Z option sorts in ascending order. The Z–A option sorts in descending order. Both modes use the same case-insensitive comparison, so the only difference is whether the final list is flipped.

The Unique option removes repeated lines after sorting. Since the core sort is case-insensitive, uniqueness is also case-insensitive. That means “Tag” and “tag” are treated as duplicates. When Unique is enabled, the output keeps the first occurrence in the sorted sequence and drops the rest. This is helpful when you want a clean, de-duplicated list for tags, blocked terms, or quick imports.

For imported lists, it can help to keep a header line separate. If your first line is a label like “Items” or “Keywords”, move it out of the list, sort the remaining lines, then paste the header back on top. The sorter treats every line the same and does not try to detect headers or column names. That simplicity is the point: you get an exact, transparent transformation that you can repeat.

When to keep duplicates

Keep Unique off if duplicates are meaningful. For example, you might be sorting log lines, survey answers, or a list where repetition indicates frequency. In those cases, sorting helps grouping, and you can still see how many times an item appears.

When to enable Unique

Enable Unique when you need a set. Examples include removing repeated keywords, normalizing a list of categories, or preparing a deduplicated allowlist or blocklist for another system.

Quick tip

If your destination system is case-sensitive, keep Unique off and handle deduplication there. This tool is optimized for readability and scanning, not for enforcing application-specific casing rules.

Uploads, downloads, and privacy

You can paste text directly into the editor, or you can upload a supported file format. Text formats such as TXT, CSV, JSON, HTML, and XML load directly in your browser. PDF and DOCX extraction is also done locally, but those formats require optional libraries in the app bundle. If those libraries are not installed, the tool will show a clear message and you can still paste the text manually.

Download PDF creates a simple paginated document from your current text. It preserves line breaks and wraps long lines so the PDF is readable. If PDF export is not available in your build, your browser print dialog opens as a fallback so you can still save as PDF.

Privacy is straightforward: sorting happens in the browser from the text currently in the textarea. There is no server-side processing step required for the sort itself. That makes this tool suitable for quick cleanup of small lists and day-to-day formatting tasks.

What this tool does not do

This is not a spreadsheet engine. It does not parse columns, detect numeric types, or apply advanced language collation rules. It sorts lines using a simple, deterministic comparison so you can copy a clean list into your next step.

Local processing

Your list stays on your device

Sorting and deduplication run in your browser from the text you provided. Copy is explicit: you choose when to copy or download the output and paste it elsewhere.

FAQ

Quick answers about line sorting, uniqueness, and file handling.

It sorts text line by line while ignoring letter casing for the ordering step. That means “Apple” and “apple” will sort together. The output preserves your original characters, so the tool does not force everything to lowercase or uppercase.
🔗 Related tools

Other Helpful Tools

A few related projects that pair well with this tool. Fast, focused, and privacy-friendly.