Any recommended tools, which can do in-place (for in-place, I mean some IDE or tools which could have functions of both compare and merge.) compare for two files, and merge them in-place?

I currently use the diff command line, but am looking for a GUI tool.

Free tool is appreciated. :)


3 Answers 3


Here are some suggestions:

Related posts:

  • For me Meld is the best tool for Mac and Windows. Thanks Jun 15, 2019 at 15:37
  • Might be worth updating TextWrangler (now discontinued) with BBEdit. Its diff tool is excellent, though under documented. Screenshot, described in some detail here, about half-way down, and also has a command-line call: bbdiff --ignore-spaces "./path/to/file1.txt" "./path/to/file2.txt" Works in free mode too.
    – ruffin
    May 28, 2021 at 17:32

Take a look at this StackOverflow question. Might be what you asked for.

  • Nice recommendation Abdul, vote up, will try and see any further issues. :)
    – Lin Ma
    Mar 13, 2016 at 22:52

If you are already working with code then I recommend Visual Studio Code since it has an excellent built-in diff tool. Visual Studio Code is a pretty good code editor in its own right so I think it's a good app to have installed along with your other development tools. I use it to work on miscellaneous projects outside of my main IDE.

To use its compare feature, you first need two files open. Then, from the explorer panel, right click the first file and click "Select for Compare". Then, from the explorer panel, right click the second file and click "Compare with Selected". A new tab will open which shows the two files side by side with differences highlighted.

Here is an example of the difference view:

Visual Studio Code Difference Editor

Conveniently, you can also launch the difference view from the command line. Based on the documentation, it looks like you can launch it like this:

code -d /path/to/file1 /path/to/file2


code --diff /path/to/file1 /path/to/file2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.