Differences
Patch (unified diff)
Context lines in the patch come from the Before version, as with diff -w.
How to use it in three steps
Step by step, with this page's example.
- 01
Paste the old version.
- 02
Paste the new version.
- 03
See the changed lines and copy the patch.
Two versions of server.properties: a different max-players and motd, a new white-list line
--- a/server.properties
+++ b/server.properties
@@ -1,4 +1,5 @@
server-port=25565
-max-players=20
-motd=Test server
+max-players=50
+motd=VulCode server
online-mode=true
+white-list=true
Questions
- What is a diff?
- A diff lists the differences between two versions of a text: which lines were added, removed or changed. A unified diff patch writes those differences in a format that patch and git understand.
- How do I compare two text files online?
- Paste the old version into the first field and the new one into the second. The tool shows the changed lines, highlights the differing characters and gives you a patch to copy. Everything runs in your browser.
- What is a unified diff patch for?
- You can apply it with patch or git apply, or paste it into a ticket so someone sees the exact change.
- Does it compare individual characters too?
- Yes, it highlights the differing characters inside changed lines, so even a changed space shows.