29

Is there a diff tool that allows you to paste two segments of text and get a diff? I can't use an online tool because I'm dealing with proprietary data, and I haven't found a tool that provides that feature.

TimeTrap
  • 1,142
  • 1
  • 14
  • 18

9 Answers9

19

Try WinMerge. It'll do that.

Steps:

  1. Download and install winmerge
  2. Open WinMerge & Create new <CTRL+N>
  3. Paste into left & right, then refresh <F5>
MrMesees
  • 1,488
  • 19
  • 27
itsmatt
  • 31,265
  • 10
  • 100
  • 164
  • 1
    Thanks! I didn't see this feature mentioned on it's website, but it does in fact allow pasting text directly. – TimeTrap Sep 27 '11 at 14:47
  • 3
    To do it: 1) press ctrl+N. 2) paste left and right texts. 3) press F5 or refresh button. If you change the texts you must press refresh button again. – Fernando Oct 17 '14 at 07:14
  • 3
    @Fernando thanks for pointing out the *Refresh* thing, it isn't obvious that you have to click that button to get it going – ᴍᴇʜᴏᴠ Jul 13 '16 at 11:31
  • It seems that you still have to save the file first, before comparing. So it's not real copy & paste ... – testing Nov 24 '16 at 12:33
  • @testing, as mentioned by Fernando in the comments above, hit "Refresh" after you paste and you're golden. – Kirill Shlenskiy Feb 15 '17 at 03:51
  • @KirillShlenskiy: Thanks for the tip. This seems to work. But the comparing performance is ... – testing Feb 15 '17 at 12:04
12

In case anyone comes here looking for a tool for Macs that can do this, it seems that there are two tools that can do just this.

  • Beyond Compare, the Mac version is currently in beta.

  • Kaleidoscope app

    1. Copy first text
    2. File -> New from Clipboard
    3. Copy second text
    4. Edit -> Paste to comparison

Unfortunately, it doesn't seem to be possible to change the texts once they've been pasted.

There is also a similar (closed) question (the question itself was for a Mac tool, but at least one answer has an alternative diff tool for Windows):

Diff tool for Mac without saving text to files

Community
  • 1
  • 1
newenglander
  • 2,019
  • 24
  • 55
5

For those who use Atom, there’s the split-diff package.

Avi Flax
  • 50,872
  • 9
  • 47
  • 64
5

KDiff3 can do that too. On startup just Cancel the open dialog and than copy&paste snippets into the two panes. It immediately (re)computes their diff.

Michal Wirth
  • 169
  • 2
  • 8
3

Notepad++ makes it really easy to do that: paste first text, open new tab, paste second text then Plugin > Compare > Compare.

Make sure you have the compare plugin installed.

Source: https://stackoverflow.com/a/15817384/965176

Community
  • 1
  • 1
qwertzguy
  • 15,699
  • 9
  • 63
  • 66
1

I think this might be what you're looking for - Line Diff - it's a online tool that takes as input two snippets of code/text, diff them and then render a nice github like html page (permanent or temporary stored) that you can then share with coworkers.

Laur
  • 21
  • 2
1

I used BBEdit (Mac OS X):

  • paste your snippets into 2 separate new documents (without saving)
  • go to search → find differences
  • using the clock icon, pick your new documents

The app has a subscription model, but this doesn't seem to be a premium feature.

ᴍᴇʜᴏᴠ
  • 4,804
  • 4
  • 44
  • 57
1

You can try online tools it's good

https://www.diffchecker.com/

Or you can try KDIFF3 its also a good tool http://kdiff3.sourceforge.net/

Dupinder Singh
  • 7,175
  • 6
  • 37
  • 61
0

also you can try online diff tool , maybe it's useful to you.

overals
  • 92
  • 3
  • 2
    online diff tools are not recommended as sites can log your data and use it for their data mining. – vibs2006 Sep 20 '18 at 06:24