Free online text comparator

Paste two versions of a text and instantly find what has changed. The online text comparator highlights differences line by line and word by word, with options to ignore case or whitespace. Everything runs in your browser — your texts are never sent to any server.

Text A — original
0 characters · 0 lines
Text B — modified
0 characters · 0 lines

The comparison algorithm uses LCS (Longest Common Subsequence) — the same method used by git diff. Word diff highlights changes within each modified line.

How to use the text comparator step by step

1

Paste the original text in panel A and the modified text in panel B

2

Enable the options you need: ignore case or whitespace

3

Click «Compare texts» and review the diff with highlighted changes

What text comparison is used for

Comparing two versions of a text manually is tedious and error-prone. An automatic comparator finds in seconds exactly which lines or words have changed, regardless of document length. These are the most common use cases:

  • Review contracts and legal documents — Detect which clauses changed between the version sent and the one received, without reading the entire document word by word.
  • Compare code versions — Check what changed in a configuration file, script or template before applying changes to production.
  • Review translations or edited texts — Identify exactly which sentences or words the editor changed from the original, useful for translators and copywriters.
  • Detect plagiarism or differences between copies — Compare two versions of a document to confirm they are identical or find where they differ.
  • Compare data exports — Verify that two exports from a database or tool have the same content line by line.

Line diff vs. word diff

The comparator offers two levels of granularity that complement each other:

Line diff

This is the base level: the algorithm compares the two versions line by line and marks each line as equal, added or removed. A red line indicates it existed in the original text (A) but not in the modified one (B). A green line indicates the opposite: it appears in B but not in A.

Word diff

When a line has changed but not entirely, the comparator also analyses the interior of the line: it highlights in dark red the specific words that were removed and in dark green the ones that were added. This is especially useful in paragraphs of text where only a word or a date was changed.

How changes are displayed

The result follows the standard unified diff format: lines preceded by «-» are from the original text, lines preceded by «+» are from the modified text, and lines without a prefix are common to both texts.

When to use the ignore options

Ignore case

Enable this option when capitalisation differences are not relevant to your analysis. For example, if someone changes «CONTRACT» to «Contract», without this option it would appear as a difference. With the option enabled, those lines are considered equal and the diff focuses on actual content changes.

Ignore extra whitespace

This option is especially useful when comparing source code or configuration files. If the only difference between two lines is indentation or extra spaces, the comparator will treat them as equal. This way you can focus on logic changes, not formatting ones.

Using both options together

The two options are independent and compatible. You can enable them simultaneously if you want to compare only the semantic content of the texts, ignoring both capitalisation and whitespace differences.

Frequently asked questions

Is the text comparator completely free?

Yes, it is 100% free and no sign-up required. You do not need to create an account or enter your email. You can compare as many texts as you need with no usage limits.

Are my texts sent to any server?

No. All comparison happens directly in your browser using JavaScript. Your texts never leave your device and are never stored on any external server. It is safe to compare confidential documents.

How many lines can it compare?

The comparator works well with texts of up to several thousand lines. For very large texts, processing may take a few seconds since the LCS algorithm runs entirely in your browser with no server. There is no artificial limit imposed by the tool.

What does the "Ignore extra whitespace" option mean?

When enabled, the comparator treats as equal any lines that differ only in the amount of spaces or tabs. Useful when comparing code with different indentation styles, since whitespace differences are usually not relevant.

Can I compare source code with this tool?

Yes. The comparator works with any plain text: source code, configuration files, documents, logs or lists. The ignore-whitespace option is especially useful for filtering out indentation differences in code.

Working with JSON? Try the Free online JSON validator. To count words and characters use the Word counter.