Short answer: paste the older note on the left and the newer one on the right. Added lines start with +, removed lines with −, and inside a changed line the edited words are underlined or struck through. If you have one file full of <<<<<<< lines instead, switch to the conflict mode and choose a side for each conflict. Your text never leaves this page.

Compare notes or resolve conflicts

What do you have?
Options
View

Paste two versions, or load the example.

Runs in your browser. Nothing is uploaded, and your text is not saved anywhere.

How to read the result

  • Added (+). A line that is only in the newer version.
  • Removed (−). A line that is only in the older version.
  • Changed. A removed line directly followed by an added line is counted as one changed line, and the words that differ inside it are marked: added words are bold and underlined, removed words are struck through. The marks work without color.
  • Unchanged. Runs of identical lines are folded into a button. Press it to see them, or untick Collapse unchanged lines.

Word marks matter for prose. A note is mostly long paragraphs on one line each, so a plain line diff flags the whole paragraph when you changed one word. The tool compares the two lines word by word and marks only what differs.

Compare by paragraph joins wrapped lines into paragraphs, so the same text wrapped at 60 columns and at 80 columns shows no changes. The tool compares source text only; it does not render Markdown. The line diff itself is the classic shortest-edit-script approach described in Myers, “An O(ND) Difference Algorithm and Its Variations” (1986).

Resolve Git conflict markers in a note

When Git cannot combine two edits of the same lines, it writes both into the file. Git’s documentation, How conflicts are presented, describes the default layout:

<<<<<<< HEAD
your side (ours)
=======
the other side (theirs)
>>>>>>> branch-name

Everything between <<<<<<< and ======= is ours, and everything between ======= and >>>>>>> is theirs. Which side is “yours” depends on the operation: in a rebase the two are reversed from what many people expect, as the phone conflict guide explains.

The merge.conflictStyle setting in git config can be merge (the default), diff3 or zdiff3. With diff3 or zdiff3, Git adds a base section that starts with |||||||: the text as it was before either side changed it. It shows what each side started from, so you can tell an edit from a deletion. This tool reads all three styles.

Choose Keep ours, Keep theirs or one of the two Keep both options for each conflict, check the preview, then copy the resolved note. The copy button stays off while any marker is left. If the markers are unbalanced, the tool tells you the line number to fix first.

After you paste the result into the file and save it, stage and commit the file so Git records the resolution. To do this on a phone, follow resolving Obsidian Git merge conflicts on iPhone. Plain ======= lines outside a conflict, such as a Markdown heading underline, are left alone.

Where duplicate or conflicting notes come from

Git

Git writes the markers above into the note when a merge, rebase or pull cannot combine two edits of the same lines. Paste the file in conflict mode.

Syncthing

When both devices change a file while apart, Syncthing keeps both and renames the older one to name.sync-conflict-<date>-<time>-<modifiedBy>.md, per the Syncthing docs on conflict handling. Paste the original as “Original” and the conflict copy as “Changed” to see which edits are in which. The Syncthing on iPhone guide covers the rest.

Cloud drives

A cloud drive that cannot merge two edits may leave a second copy of the note next to the first. The names differ by service, so look in the folder for a near-duplicate of the note, then compare the two files here. See Obsidian with Google Drive and iCloud vs Git for Obsidian.

Obsidian Sync

Obsidian’s page on how Sync handles conflicts says Markdown notes are merged automatically by default, and that Sync can be set to create conflict files instead. If you end up with a conflict file, compare it with the note here.

Get the older version from Git

If the vault is in Git, git show <commit>:path/to/note.md prints the note as it was in that commit (git show). Paste that into “Original” and the current file into “Changed”. Your Git client’s file history gives you the same text. Back up an Obsidian vault with Git and restore notes shows how to find the commit.

Frequently asked questions

Is my text uploaded?

No. The comparison, the conflict parsing and the copy buttons all run as JavaScript in your browser. The page makes no network requests for your text and does not store it.

Does it render Markdown?

No. It compares the source text of your notes, so you see the # marks, asterisks and brackets exactly as they are in the file. It does not draw headings, lists or links. To see a note rendered the way GitHub and Obsidian show it, use the Markdown preview.

Can I compare more than two files?

No. The tool compares one older version with one newer version. To compare three copies, compare them in pairs. Each side is limited to 5,000 lines.

What does ||||||| mean in a conflict?

It starts the base section that Git writes when merge.conflictStyle is diff3 or zdiff3. The base is the text as it was before either side edited it, shown between the ours section and the ======= line. The default merge style leaves it out.