Diff & Merge

Text & Code Diff

Compare two texts side by side with changed words or characters marked, ignore whitespace or case if you like, and save a patch.

Original

11 lines · LF

Changed

12 lines · LF

About this tool

Paste or drop two versions of any text, such as code, HTML, CSS, XML, Markdown or prose, and see what changed side by side or in one column, with the changed words or characters marked inside each line. Unchanged stretches fold away, and you can step from change to change.

Ignore whitespace, case or line endings when they don’t matter to you. That only changes what counts as a difference: the texts on screen and the patch you save stay exact. Hidden characters, such as a byte order mark, zero-width spaces or the bidirectional controls used to disguise code, are always marked.

Save the changes as a unified diff with the file names you choose, ready for git apply or patch. Files are read exactly as they are, line endings and byte order mark included, and nothing is saved or uploaded.

Why does every line show as changed?

Usually because one file uses Windows line endings (CRLF) and the other Unix ones (LF). The tool tells you when that’s the case; turn on “Ignore line endings” to see only the other changes.

Can it compare XML or JSON by structure?

This tool compares text line by line. For JSON, the JSON Diff compares by structure instead, so key order and formatting don’t matter.

esc
  • Opens in its own window, like any app
  • Works without an internet connection
  • Starts instantly from your home screen or dock

Look for the install icon at the right end of your browser’s address bar, or open the browser menu and choose Install Interformat.