The "a line went missing" problem
You export a file, process it, and export it again — and the counts do not match. A record dropped out. A configuration entry disappeared. A line in a log got duplicated. Somewhere between two versions of a text file, something was added, removed, or repeated, and you need to know exactly which line.
Counting lines only tells you that the totals differ, not where. Reading two long files side by side by eye is slow and unreliable — the human eye is remarkably good at skipping over the one line that is different. A diff tool exists precisely for this: it finds the specific lines that do not match between two files.
Finding missing and added lines
Put the original file in the left panel and the second version in the right panel of the Text & Code Difference Checker, then compare.
Missing lines — present in the original but gone from the new version — appear as removals (red) on the left with no matching line on the right. These are the lines that disappeared.
Added lines — present in the new version but not the original — appear as additions (green) on the right. These are the lines that appeared.
If the files are meant to be identical and you are hunting for a single dropped line, turn on "Hide unchanged." Everything that matches collapses away, leaving only the handful of lines that differ. In a 5,000-line file, that turns the search into reading three or four highlighted lines.
Sort first if order does not matter
Whether to sort depends on what "missing" means for your files.
If the lines have a meaningful order that must be preserved — source code, a sequential log, a configuration file where order matters — do not sort. Compare the files as-is so you can see both what changed and whether anything moved.
If the files are really just sets of lines where order does not matter — a list of IDs, exported records, a dump of keys — sort both files the same way before comparing. Otherwise a single line inserted near the top shifts everything below it and the diff looks enormous. After sorting, a truly missing line stands out cleanly as a single removal, because every other line still lines up with its counterpart.
Finding duplicate lines
Duplicates are a slightly different question, and there are two versions of it.
Did a line get duplicated between the two versions? If a line appears once in the original and twice in the new file, comparing them shows the extra copy as an addition — one green line — so the diff points you straight to it.
Are there duplicates within a single file? A two-panel diff compares two files, so to find repeats inside one file you need a different move: sort the file's lines, and any duplicates end up adjacent to each other, which makes them easy to spot by eye or with a "remove duplicates" command. Many editors and spreadsheets have a Remove Duplicates function that both reveals and strips them. If you want to confirm a suspected duplicate is truly identical and not just similar, paste the two instances into the two panels and compare with character precision.
Clean up noise with case and whitespace options
When you are hunting for a genuinely missing line, false differences are the enemy — they hide the real one. Two options remove the most common noise:
Ignore whitespace suppresses differences caused by trailing spaces, tabs-versus-spaces, or inconsistent indentation. These are extremely common when a file has passed through different tools, and they can make dozens of lines look changed when nothing meaningful did.
Ignore case treats uppercase and lowercase as equal, so a line that differs only in capitalisation does not register as a change. Turn it on when case is not meaningful for your data, and leave it off when it is (for example, when comparing case-sensitive identifiers or passwords).
With the noise removed, a real missing or duplicated line is usually the only thing left highlighted on the screen.
For very large files or automation
A visual diff comfortably handles files up to thousands of lines and gives you an immediate, readable answer — which is what you want for a one-off investigation.
If you are dealing with very large files or need this as part of a repeatable process, the command line is faster. On Mac or Linux, comm -23 <(sort a.txt) <(sort b.txt) prints lines only in the first file, and diff a.txt b.txt gives a classic line diff. sort file.txt | uniq -d prints duplicate lines within a single file. Use those when the task is scripted or the files are huge; use the visual tool when you want to see the result, share it, or check a file quickly without opening a terminal.