Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a tool for comparing two lines of text?

All the tools I have compare on a line level, when I really need a character level diff in the line.

Windows or *nix, GUI or command line, I don't care.

share|improve this question
See most apps highlight differences within a line too. – ChrisF May 25 '10 at 21:14
@ChrisF I'm already using WinMerge, and it does ... ok, but not exactly what I'm looking for. – C. Ross May 27 '10 at 0:14
up vote 4 down vote accepted

I use vimdiff often to compare two files side by side. vimdiff in color mode will highlight all differences between corresponding lines on each side. I'm using it to look for different characters on two different lines (in different files) right now.

share|improve this answer

kdiff is one open source diff utility that shows character by character differences as well as line by line. I'm sure there are others. Here's link for kdiff:

share|improve this answer
+1 I love this program (to be fair, I haven't really tried anything else for comparison) – David Z May 26 '10 at 2:35

DiffMerge does pretty good at highlighting word or character differences. Better than WinMerge, IME.

share|improve this answer

Use this perl script from the git project.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .