What Load sample shows
Load sample fills both boxes with top pages from two months on toolexe.com, pasted the way a messy export arrives. List A holds 8 lines and 7 distinct URLs. List B holds 9 lines and 8 distinct URLs. Four URLs land in the table.
Two of those four only match because of the default settings. List B spells one URL /JSON/Viewer in capitals and pads the beautifier URL with three trailing spaces. Untick Ignore case and the shared count falls to three. Untick Trim line edges and the beautifier row goes too. The table prints the List B spelling in orange under a line when capitals or inner spacing differ, so you see what the settings forgave.
The word counter URL sits on lines 2 and 7 of List A and lines 6 and 9 of List B. It takes one row with both positions. Tick Keep repeats and your copy holds it twice, for five lines in total.
How two lines count as a match
Matching runs on whole lines. Order plays no part, so line 40 of List A pairs with line 2 of List B. The Default column shows the result with the settings as the page loads.
| List A | List B | Default | What changes the result |
|---|---|---|---|
Order 4417 | order 4417 | Match | Untick Ignore case |
Order 4417 | Order 4417 with trailing spaces | Match | Untick Trim line edges |
Order 4417 | Order 4417 with two inner spaces | No match | Tick Collapse inner spaces |
café as one character | café as e plus an accent | Match | Always on, both reduce to one Unicode form |
Order 4417 | Order 4417, | No match | No setting. Strip the comma first |
straße | STRASSE | No match | No setting. Ignore case compares lowercase forms, and the two stay different |
Two lines look identical and still fail? Suspect a hidden character. Text from Word, PDFs and web pages often carries a no-break space inside the line or a zero-width space. Paste the line into the Character Frequency Counter and the table names the culprit. A Windows line ending and a byte order mark at the top of a file cause no trouble here, since both get removed before matching.
The same job in a terminal or a spreadsheet
Scripted work belongs in a script. Each method below gives a slightly different answer, and the gap decides which one fits. We ran comm, grep and uniq against the sample lists with no cleanup. All three missed the viewer and beautifier URLs, the same two the default settings here rescue.
| Where | Command | Watch for |
|---|---|---|
| Bash | comm -12 <(sort a.txt) <(sort b.txt) | Both inputs need the same sort order. A line repeated in both files prints as many times as the smaller count. |
| Grep | grep -Fxf a.txt b.txt | No sorting needed. Prints every match in List B order, repeats included. Add -i to ignore case. |
| Bash | sort a.txt b.txt | uniq -d | Short and wrong for repeats. A line entered twice in one file reports as shared even when the other file lacks it. Dedupe each file first. |
| PowerShell | Compare-Object (gc a.txt) (gc b.txt) -IncludeEqual -ExcludeDifferent | Ignores case by default. Add -CaseSensitive to keep case. |
| Python | set(a) & set(b) | Drops order and repeats. Strip each line first, or a final line with no newline misses its match. |
| Excel 365 | =FILTER(A2:A200,COUNTIF(B2:B200,A2:A200)) | COUNTIF ignores case and treats * and ? as wildcards, so a line holding either returns false matches. |
| SQL | SELECT email FROM a INTERSECT SELECT email FROM b | Returns distinct rows. Case handling follows the column collation. |
Jobs where two lists meet
Mailing list overlap
Paste two exported address columns to see who signed up twice. Keep Ignore case on, because signup forms store capitals as typed. Gmail ignores dots in an address and this page does not, so a dotted and an undotted version stay separate rows.
Pages in two Search Console exports
Compare two periods and keep the URLs ranking in both. Check protocol and trailing slashes first. A page exported with a slash in one file and without in the other counts as two lines.
Shared packages between projects
Run pip freeze in each project. Full lines compare exact versions, so requests==2.32.3 and requests==2.31.0 miss. Cut everything after the package name to compare names instead.
Errors in two log files
A timestamp makes every log line unique, so a raw compare returns nothing. Remove the date column first, then the table shows errors present on both days, and the line numbers take you back to each file.
Where this tool stops
- Two lists at a time. For a third, copy the result into List A and paste the new list into List B.
- Whole lines only. A CSV row matches only when every column agrees. Reduce the file to the one column you care about before pasting.
- No fuzzy matching.
Jon SmithandJohn Smithstay apart, and so does a typo. Use a record linkage tool for messy names. - Lines outside the match. The bar and the counts show how many lines belong to one list, and the table stays on shared lines. Find Unique Lines prints the rest.
- File size. Open .txt accepts files up to 5 MB, and the table draws the first 300 rows. Copy and Download carry every line. Two lists of 200,000 lines each took about half a second on our test laptop in Chrome.
Pick the right line tool
| Your question | Use |
|---|---|
| Which lines appear in both lists? | This page |
| Which lines appear in one list and not the other? | Find Unique Lines |
| How similar are the two blocks overall? | Text Line Comparison |
| What changed between two versions of a document? | Text Difference Checker, because position matters there |
| Which lines repeat inside one list? | Duplicate Line Remover |