in Explorer window, Right-Click on first file and select:

then Right-Click on second file and select:

Screencast:

Top answer 1 of 16
1345
in Explorer window, Right-Click on first file and select:

then Right-Click on second file and select:

Screencast:

2 of 16
496
You can compare files from the explorer either from the working files section or the folder section. You can also trigger the global compare action from the command palette.
- Open a folder with the files you need to compare,
- Select two using SHIFT
- Right click "Compare Selected"

Can i open 2 files and see them on the same window to compare?
That's a basic feature. Just do ctrl + shit + p then search something along the lines of "compare files" (I'm not sure of the exact terms and can verify right now). More on reddit.com
Any way to compare edited version of file with version that is in git?
I am mostly editing .html, .jsp, etc files but I remember the JetBrains tools like PyCharm had margin color coding to show the changes made since the… More on reddit.com
Comparing files with VSCode
Either right mouse and select for compare and then the other file or from command line code --diff file1 file2 More on reddit.com
VSCode switches tabs when comparing two files
Never seen it. If you want to investigate if it's an extension causing it, you could try bisect. More on reddit.com
Videos
How to compare 2 files in Visual Studio Code Editor
02:52
How to compare two files in Visual Studio Code - Easy! - YouTube
02:22
How to compare 2 files in VS code Line By Line - YouTube
How To Do A Diff in VS Code (Compare Files)
01:56
How to compare two files in Visual Studio Code #vscode #vscodetips ...
Grant Winney
grantwinney.com › all posts › comparing files in vs code
Comparing files in VS Code | Grant Winney
October 11, 2025 - Open the “Explorer” pane on the left, then press the “…” item in the top corner and select “Open Editors”. Select both files, right click, and choose “Compare Selected” from the context menu:
Reddit
reddit.com › r/vscode › can i open 2 files and see them on the same window to compare?
r/vscode on Reddit: Can i open 2 files and see them on the same window to compare?
October 29, 2024 -
Do i need a plugin for that? It would help me a lot.
Top answer 1 of 4
5
That's a basic feature. Just do ctrl + shit + p then search something along the lines of "compare files" (I'm not sure of the exact terms and can verify right now).
2 of 4
4
You can select two files in the file Explorer View by holding Shift and clicking and choosing "Compare Selected" in the context menu.
Visual Studio Marketplace
marketplace.visualstudio.com › items
Compare Folders - Visual Studio Marketplace
Extension for Visual Studio Code - Compare folders by contents, present the files that have differences and display the diffs side by side
WEBPEAK
webpeak.org › blog › vs-code-compare-two-files
Vs Code Compare Two Files | Web Peak
November 20, 2025 - Yes—create and compare temporary files or use clipboard diff extensions. No, VS Code only displays text differences. Use external tools for binary diffing. Yes, you can copy chunks of code between diff panes, but automatic merging requires Git-based tools or extensions. You can only view two files per diff panel, but you can open multiple diff sessions in separate tabs.
Visual Studio Code
code.visualstudio.com › docs › sourcecontrol › overview
Source Control in VS Code
November 3, 2021 - Diff editor: side-by-side file comparisons for effective change review
YouTube
youtube.com › watch
How to Compare Files In VSCode - YouTube
In this Visual Studio Code tutorial, learn how to use compare or diff multiple files using a couple different methods#vscode #editing #coding
Published October 9, 2024
YouTube
youtube.com › visual studio code
Diff files in VS Code - YouTube
AboutPressCopyrightContact usCreatorsAdvertiseDevelopersTermsPrivacyPolicy & SafetyHow YouTube worksTest new features · © 2025 Google LLC
Published September 7, 2023 Views 37K
Visual Studio Marketplace
marketplace.visualstudio.com › items
Select Compare Tabs - Visual Studio Marketplace
August 18, 2023 - Extension for Visual Studio Code - Adds select compare options to tabs in the editor for quicker access to diff functionality as well as ability to swap files in diff editor.