Free Online Diff Viewer - Code Comparison Tool

Updated: 2026-07-11

Input Text to Compare

Original Text (left)
Modified Text (right)

About Text Diff Comparison

What is text diff comparison?

Text diff comparison (Diff) is a way to compare two text versions and find the differences between them. It is widely used in code version control, text file tracking, config file comparison, and other scenarios.

Comparison algorithm

This tool uses the Longest Common Subsequence (LCS) and Myers diff algorithms, the same algorithm used by Git diff. It accurately finds the minimal edits between two text segments and highlights the differences.

Comparison modes

Color legend

FAQ

Which comparison modes are supported?

Two modes are supported: Side by Side and Unified. Side by side places the two text versions in separate columns for comparison; unified merges and displays the differences with different colors, similar to Git diff output.

What do the colors in the results mean?

Green background indicates new rows (only in the right text); red indicates deleted rows (only in the left text); yellow indicates modified rows (in both texts but with different content); gray indicates unchanged rows.

Is my data safe?

Absolutely secure. All text comparison runs locally in your browser β€” no text content is ever uploaded to a server. Even if your text contains private code or files, nothing is transmitted.

Can I compare files?

Yes. Drag and drop or click the upload button to import files into the input panels. Text and code files are supported. File contents are read locally in your browser and never uploaded to a server.

What is character-level highlighting?

Character-level highlighting (Inline Diff) works inside a line. Instead of marking the whole row, it precisely highlights which specific characters changed. This is especially useful for small modified rows.