FileKiln

Text Diff Checker

Compare two blocks of text line by line and see exactly what was added, removed, or unchanged. Diffing runs in your browser; nothing is uploaded.

Ready when you arediff a ⇄ b
Runs on your computer. Nothing gets uploaded.

Your stuff stays yours. The conversion happens in this page's JavaScript. Nothing you paste here leaves your machine, and the tool keeps working with the network unplugged.

Paste the original on the left and the changed version on the right, and get a unified diff: unchanged lines indented, removed lines marked -, added lines marked +, with a summary count on top. The comparison uses a longest-common-subsequence algorithm - the same family of algorithm behind git diff - so a paragraph inserted in the middle shows up as an insertion, not as a wall of false changes. Diff tools are exactly where private text ends up: contracts before and after redlining, config files from two environments, essay drafts. This one never transmits either side anywhere.

How to compare two texts

  1. Paste the older version into Original (A).
  2. Paste the newer version into Changed (B). The order matters: swapping the boxes turns every addition into a removal and the other way around.
  3. Press Compare. The Diff out box shows a summary line with the number of added, removed, and unchanged lines, then a blank line, then the full diff.
  4. Read the diff from top to bottom. Each line starts with a two-character marker: - for a line only in A, + for a line only in B, and two spaces for a line in both.
  5. Press Copy result to paste the diff into a ticket, a review comment, or an email. Clear empties all three boxes.

How to read a line diff

A line diff treats each line as a single unit. Two lines are either exactly equal, character for character, or they are different. There is no partial match, so a line where one word changed shows up as a pair: the old line marked - and the new line marked +. When you see a - line followed directly by a + line, read them as "this line was edited" rather than as two unrelated changes.

The summary line counts lines, not edits. One edited line adds one to the added count and one to the removed count. A summary of +3 added -2 removed might describe two edits and one brand new line, which is exactly what the example below shows.

Before running the comparison, the checker strips any identical lines at the start and end of both texts. Those lines still appear in the output as unchanged, but they do not count against the 2000-line limit. This is why a long file with a small change near the middle compares quickly: only the section between the first and last difference goes through the full algorithm.

When no line differs, you get a single sentence instead of a diff, such as Texts are identical (12 lines).

A worked example

Here is a small config file before and after a deploy change. Original (A):

host: db01
port: 5432
user: app
pool: 10
timeout: 30

Changed (B):

host: db02
port: 5432
user: app
pool: 20
ssl: true
timeout: 30

Pressing Compare produces:

+3 added   -2 removed   3 unchanged

- host: db01
+ host: db02
  port: 5432
  user: app
- pool: 10
+ pool: 20
+ ssl: true
  timeout: 30

Two lines were edited (host and pool) and one was inserted (ssl). The unchanged lines keep the changes in context, so you can see that ssl: true landed just above timeout.

Common problems and how to fix them

Lines that look identical are marked as changed

The comparison is exact, so trailing spaces, tabs versus spaces, and non-breaking spaces all count as differences. This happens a lot with text copied from a web page or a word processor. If two lines look the same but show as - and +, check for invisible whitespace at the end, or paste both texts through the same plain-text editor first.

An extra "+" line with nothing after it at the end

One side ends with a line break and the other does not. A final line break creates an empty last line, so A = a and B = a followed by a newline gives +1 added -0 removed 1 unchanged with an empty added line. Delete the trailing newline from B, or add one to A, if you only care about content.

The whole text shows as one removed and one added line

Your text has no line breaks, for example a paragraph copied from a document, or minified JSON or CSS. With only one line per side, any change replaces the whole line. Put each sentence, property, or record on its own line before comparing. For JSON, format both sides with the JSON formatter first so each key gets its own line.

Error: "More than 2000 differing lines per side"

After identical lines at the top and bottom are set aside, the remaining middle section is still longer than 2000 lines on one side. Split both texts at a point you know matches, such as a section heading, and compare each part separately.

A moved block shows as a removal and an addition

A line diff has no concept of "moved". If you cut a paragraph and paste it further down, it appears as - lines in its old spot and + lines in its new spot. That is expected; compare the text of the two blocks to confirm nothing changed inside them.

Related tasks

If you are comparing lists and only want to know which entries exist, clean each list with remove duplicate lines using Sort + dedupe first, so the order of entries stops producing noise in the diff.

Questions this tool gets asked

How does the comparison work?

Line by line, using a longest-common-subsequence algorithm. It finds the largest set of lines the two texts share in order, and reports everything else as an addition or removal - the same approach version-control diffs use.

Can it compare word-by-word instead of line-by-line?

Not yet. Line diffs are the reliable workhorse for code, configs, and prose with line breaks. For prose in one long paragraph, split it into sentences per line first and the diff becomes readable.

Is there a size limit?

Identical leading and trailing lines are skipped for free, then up to 2000 differing lines per side are compared. That covers configs and documents; for giant files, diff them in sections.

Which side is which in the output?

Lines starting with - exist only in the left (original) text; lines starting with + exist only in the right (changed) text. Indented lines appear in both.

Related tools