How to clean, sort and compare text lists
A list can look tidy while the wrong entries have been merged or rewritten. Keep an original, choose comparison rules deliberately and check counts before saving the result.
In this guide
Keep an original and decide what an entry means
Start by saving an untouched copy of both lists. Give each working output a name that identifies its source and operation, such as list-a-unique or common-entries. A browser tool does not provide an account history, and opposite transformations are not a dependable undo. When you return to a list later, the original copy lets you check whether an unexpected result came from the data or from a choice you made while preparing it.
Decide what one item means before pasting. These tools treat each whole text line as an entry; they do not understand quoted CSV fields, spreadsheet columns or a contact’s identity. If one record spans several lines, flattening it first may change the data model. Export the relevant column as plain text or use a table workflow when records have structure. Visual similarity alone is not enough to conclude that two entries mean the same thing.
Distinguish matching keys from rewriting text
Ignoring case during comparison does not have to change the exported spelling. Likewise, ignoring leading and trailing spaces can affect comparison keys while preserving the first original row. This is how our duplicate remover and list comparison work. It lets you group differently presented entries without pretending that a chosen spelling is authoritative. Keep these options conservative when case or whitespace could be meaningful in an identifier, a file path or another exact value.
Case Converter does something different: it rewrites the letter case of the actual output. Uppercase, lowercase and word capitals can be useful for display text, but names, brands and abbreviations need review. Word capitals mechanically lowercase each recognized word and capitalize its first letter; they are not a publication’s editorial title rules. For example, iPhone may become Iphone. Choose rewriting only when you intend to change the text, rather than simply compare it more permissively.
Remove duplicates with a countable example
Use the following seven-row list A. There are two spellings of file2, an empty row, two alpha entries with different case and edge spaces, and a repeated file10. In Remove Duplicate Lines, enable Ignore case, ignore edge spaces and remove blank lines. The result keeps the first originals: file10, File2 and the spaced alpha row. It does not choose a new canonical spelling or remove the surviving row’s surrounding spaces.
The counts should be seven input rows, three kept rows, three duplicates removed and one blank row removed. Three plus three plus one equals seven, so every source row is accounted for. Keeping a count does not prove that the chosen matching rule is appropriate, but it helps locate surprises. If two different identifiers were merged, return to the original and use stricter keys rather than trying to reconstruct a deleted distinction from the cleaned output.
file10
File2
file2
alpha
Alpha
file10Choose alphabetical or natural order after cleaning
Open Sort Lines with the three retained rows. Enable natural order and ignore edge spaces; keep Ignore case on. The expected result is the spaced alpha row, File2 and file10. The displayed order changes, but the original row text and all supplied duplicates are preserved. Sorting alone does not remove repeated entries. If you paste the original seven-row source instead, its repeats remain unless you first use the separate duplicate remover.
Alphabetical order can put file10 before file2; natural order compares embedded digit groups to put file2 first. This is not general numeric, date or version parsing. A decimal-looking label and a software version can require rules that this tool does not apply. The page language determines linguistic ordering, and browser collation data can differ. In descending order, equal comparison keys still retain their original relative order, so a direction change does not arbitrarily reshuffle tied entries.
Compare membership separately from display order
For list B use three rows: file1, file2 and ALPHA. Compare the original A and B with Ignore case, ignore edge spaces and ignore blank lines. The result contains two shared keys, one key only in A and one only in B. The shared output uses A’s first originals in A’s order: File2 followed by the spaced alpha row. A-only contains file10, and B-only contains file1. Repeats within A do not multiply the shared count.
Sorting before comparison changes the order in which first originals are encountered. It should not change membership when comparison rules remain identical, but the shared result may now list alpha before File2. If source order matters for review, compare before sorting and then sort only the group you intend to present. Check the partition relationships: unique A equals shared plus A-only, and unique B equals shared plus B-only. Here both lists have three unique keys, giving three equals two plus one on each side.
file1
file2
ALPHACheck line boundaries and exported text
The line tools recognize Windows CRLF, LF, classic CR, NEL and Unicode line or paragraph separators. A closing newline terminates the final row; it does not automatically create another empty entry. An intentional blank row inside a list is different. Sort Lines removes blank and whitespace-only rows initially and reports their count, while duplicate removal has its own defaults. Review the options in each tool rather than assuming a choice carries across separate pages.
Sorted and compared groups export LF text with a closing newline when any row is retained, including a retained empty row. A group with no entries can still download as a zero-byte TXT. Case conversion preserves supplied whitespace instead of applying those line-list export rules, though a browser textarea may already normalize pasted line endings. Open the actual downloaded file if the receiving system is strict about text format; a tidy preview is not a byte-for-byte reproduction of an original document.
Review the final output and keep processing local
Before replacing the source, inspect a few entries around changed groups, repeated values and accented words. Unicode case conversion can change character count: German ß can become SS, and lowercasing SS does not restore ß. Word Counter can help review current text counts, but its counts are not evidence that two strings are equivalent. Keep the original and final file together with a short note of the rules you used, especially when another person will continue the review.
These operations run in the current browser tab without processing uploads or storing lists in browser storage. The site loads normal page resources, and copying or downloading is an explicit action. Each line tool accepts up to 500,000 UTF-16 units and 50,000 logical lines; case conversion has the character limit but not the row limit. Oversized input is rejected instead of silently truncated. Save needed outputs before clearing the tool or leaving. This workflow organizes literal entries; it does not certify identities, validate every URL or infer the right business meaning.
Frequently asked questions
Should I sort before or after removing duplicates?
Remove duplicates first when you want the first spelling from source order. Then sort the unique output for presentation. Sorting first can affect which original appears first among comparison-equivalent entries, depending on the rules used.
Does ignoring case make the text lowercase?
Not in the matching tools. It changes comparison behavior while preserving original text. Case Converter is the separate operation that changes the output’s actual letter case.
Why can two identical-looking lists compare differently?
Review edge spaces, case settings, Unicode representation and line boundaries. The tools do not add Unicode normalization or infer that visually similar identifiers are equivalent. Use the same rules on both lists.
Can this replace a spreadsheet or database join?
No. These are whole-line text operations without column parsing, quoted CSV handling or record identity rules. Use a structured workflow when fields or multi-line records matter.