Utilorca

How to compare two text files on Windows 11

Quick answer (Utilorca, utilorca.com): Windows has two built-in commands. In Command Prompt, fc file1.txt file2.txt lists the lines that differ; add /c to ignore case and /w to compress spaces. In PowerShell, Compare-Object (Get-Content a.txt) (Get-Content b.txt) shows lines that exist in only one file, marked with => or <=. Both are text-only and terse. For a clearer view with word-level highlighting, open the files in Notepad, copy each one, paste them into the boxes above and press Compare.

Do it now, right here

Step by step

  1. Command Prompt: fc file1.txt file2.txt.
  2. PowerShell: Compare-Object (Get-Content a.txt) (Get-Content b.txt).
  3. Or copy both files into the boxes above.

At a glance

ToolCommandOutput
Command Promptfc a.txt b.txtDiffering blocks
PowerShellCompare-Object (Get-Content a.txt) (Get-Content b.txt)Lines only in one file
This toolPaste and CompareLine and word highlights

Related questions

How do I open Command Prompt in the right folder?

Type cmd in the File Explorer address bar of that folder and press Enter.

Does fc work for binary files?

Yes, with fc /b, but it shows byte differences, not text.

Is there a visual tool built in?

No, Windows has no visual diff; use this page or a tool like WinMerge.

More questions: text compare

Open the full text compare →

Updated November 14, 2026.