DockittDockitt

Diff Checker — Compare Two Texts Online

Compare two pieces of text online and see the differences highlighted. Line-by-line diff. Free, browser-based.

Runs entirely in your browser — no data leaves your device
No account, no signup, completely free
Instant results — no waiting for server processing
Works offline once the page is loaded
Runs entirely in your browser. Your text never leaves your device — no server, complete privacy.

The diff checker compares two texts line by line and highlights the differences: lines only in the original text are shown with a red background, lines only in the modified text are shown with a green background, and identical lines are shown in white. This is useful for comparing versions of code, configuration files, documents, or any text where you need to see what changed between two versions.

How to use

  1. Paste the original text into the left textarea and the modified text into the right textarea.
  2. Click 'Compare' to see the differences highlighted below.
  3. Red lines exist only in the original. Green lines exist only in the modified text.

FAQ

How does the line-by-line diff work?

The tool splits both texts into lines and uses a longest common subsequence (LCS) algorithm to identify matching lines. Lines present in the original but not the modified version are marked as removed (red). Lines present in the modified but not the original are marked as added (green). Lines that appear in both are marked as unchanged (grey). This is the same approach used by the Unix diff command and tools like git diff.

Is the comparison case-sensitive?

Yes. The comparison is case-sensitive by default — 'Hello' and 'hello' are treated as different lines. Leading and trailing whitespace differences are also detected. A line with trailing spaces is treated as different from the same line without trailing spaces.

Can I compare code files using this tool?

Yes. Paste the old version of a file in the left area and the new version in the right area. The diff will show exactly which lines changed. For code, this is similar to running git diff between two versions of a file. The tool works with any text format — code, configuration files, documentation, prose — as long as the content is line-oriented.

Does the tool support character-level diff?

This tool performs line-level diff only — it shows which lines are added, removed, or unchanged, but does not highlight which specific characters within a changed line are different. For character-level or word-level diff highlighting within changed lines, use a dedicated diff tool like git diff with the --word-diff flag, or a desktop application like Meld or Beyond Compare.

What is the maximum size of text I can compare?

There is no hard limit, but the LCS algorithm has O(n×m) complexity where n and m are the number of lines in each text. Very long texts (thousands of lines each) may take a second or two to compare. Texts with tens of thousands of lines will be noticeably slow. For large files, a command-line tool like diff or git diff is more appropriate.

Is my text sent to a server?

No. The diff algorithm runs entirely in your browser using pure JavaScript. No data is sent to any server. This makes the tool safe for comparing confidential documents, proprietary code, or sensitive configuration files.