Everyday · TextRuns locally

Text Compare and Diff Checker

Paste an original and revised version to see what changed. Compare by line, word, sentence, or character without uploading either text.

New to text comparison? Read the step-by-step guide

Compare an original with a revision

Add both versions, choose how to divide the text, then select Compare. Editing either input does not run an expensive comparison automatically.

200,000 characters per side

The earlier or starting version. A warning appears at 75,000 characters.

0 characters

Limit: 200,000

The newer or edited version. Your text remains here until you select Clear.

0 characters

Limit: 200,000

Comparison

Lines is the fastest starting point for documents, lists, and code.

General options

Mode options

Lines only

Used for word or sentence boundaries. Leave empty to use the browser locale.

Advanced processing limits

These limits protect the browser from unusually costly comparisons. Smaller values stop earlier; larger values may keep the tab busy for longer.

100–5,000 ms.

100–100,000 edit steps.

Add both versions, then select Compare.

Step-by-step guide

Learn text comparison from the beginning

This guide explains what a diff shows, how the four modes divide text, and how to read the result without treating it as a judgement about meaning or writing quality.

Back to Text Compare
Beginner guide contents
Start here

Text comparison in one minute

A text comparison, often called a diff, puts an earlier version beside a newer version and marks what stayed, what disappeared, and what was added.

Foxger divides both texts into lines, words, sentences, or characters. Those units are called tokens. It then matches tokens and presents additions, removals, and unchanged context.

Text Compare does not

  • decide which version is more accurate or better written;
  • find grammar mistakes or check facts;
  • measure whether two passages mean the same thing;
  • save, publish, or share either text.
Choose the right task

Do you need this tool?

Text Compare is useful when exact wording or layout changed between two text versions.

It may help when

  • reviewing two drafts of a report;
  • checking a copied configuration or code sample;
  • finding edits in a list, email, or set of notes;
  • confirming whether two plain-text values match;
  • creating an exact line patch for a small file.

Choose another kind of review when

  • you need grammar or spelling advice;
  • you need to confirm whether a claim is true;
  • you want to compare the meaning of paraphrased passages;
  • you need tracked author comments or document collaboration;
  • you need to compare images, formatting, or binary files.
Set the direction

Original versus revised text

Original means the earlier or starting version. Revised means the newer or edited version.

This guide uses one example throughout:

Original

Foxger creates useful browser tools.
The tools work locally.

Revised

Foxger creates practical browser tools.
The tools work locally and require no account.

If you swap the boxes, additions become removals and removals become additions. Unchanged content remains matched, although the presentation can shift with the selected mode.

Read the labels

Additions, removals, and unchanged text

Added
Content present in the revised text but absent from its matching original area. The example adds and require no account.
Removed
Content present in the original but absent from its matching revised area. In Word mode, useful is removed.
Unchanged
Content matched in both versions. Words such as Foxger creates provide context around the edit.

A replacement often appears as one removal near one addition. The tool uses labels and symbols as well as colour, so the meaning does not depend on colour alone.

Default mode

Line comparison

A line is text between line breaks. Lines mode treats each complete line as a unit and is a strong starting point for lists, code, configuration, and documents arranged in paragraphs.

Both lines in the example contain an edit, so a line diff can show each old line as removed and each new line as added. It does not isolate useful and practical as precisely as Words mode.

Closer prose review

Word comparison

Words mode uses language-sensitive browser segmentation when available. In the example, it can keep Foxger creates unchanged, remove useful, and add practical.

Word boundaries differ across languages. An optional locale such as en,ja, or th gives the browser relevant language context. Older browsers can use the comparison library’s documented fallback, so results may differ between browsers.

Larger writing units

Sentence comparison

Sentences mode divides prose into sentence-like segments. A punctuation mark and surrounding spacing can help the browser decide where one sentence ends.

Because both example sentences changed, this mode may present two broad replacements. It can be useful for moved or rewritten passages, but it does not determine whether a rewrite keeps the same meaning. Sentence detection is an estimate and can vary by language and browser.

Smallest edits

Character comparison

Characters mode compares small text units and can expose punctuation, spelling, or spacing edits. It may mark the letters that change between useful and practical.

This detailed mode can create many tokens and may require more work for large, very different texts. Use Lines or Words when the character result becomes noisy or reaches a processing limit.

Choose a layout

Inline versus side-by-side view

The view changes presentation only. Switching it does not recalculate the diff.

Inline

Shows all tokens in one reading sequence. It works well for short prose and small screens.

Example pattern: unchanged text, removed useful, then added practical.

Side by side

Pairs original content with revised content in two columns. On narrow screens, each pair stacks vertically.

Long lines stay inside the result panel and can scroll without widening the entire page.

Read the workbench

Understand every option

Each control changes the comparison or what happens to its local result.

Original text

The starting version. Foxger preserves it until Clear is selected and does not automatically overwrite it.

Revised text

The edited version. Swap exchanges the two boxes without running a new comparison.

Compare by

Chooses Lines, Words, Sentences, or Characters. This defines the counted token.

Ignore letter case

Treats capital and small forms as matching where the selected comparison supports it. This can hide a meaningful capitalisation edit.

Equivalent line endings

Treats Windows CRLF and Unix LF line breaks as the same. It is enabled by default. Foxger keeps raw endings exposed during an explicit paste before the textarea displays them in the browser’s normalised form.

Ignore line whitespace

In Lines mode, ignores leading and trailing spacing while matching lines. Indentation changes can then disappear.

Ignore final newline

In Lines mode, hides only the difference caused by one text ending with a final line break.

Text locale

Gives Words or Sentences mode a BCP 47 language tag. Invalid or unsupported values fall back calmly to the browser locale.

Processing limits

Time and edit-length budgets stop unusually costly work. Increasing them may keep the browser busy for longer.

Compare

Runs the selected diff. Input edits show a stale notice instead of recalculating on every keystroke.

Load example and Clear

Load example fills the guide’s two versions. Clear removes both inputs and the result.

Result view

Switches between Inline and Side by side while keeping the same result data.

Copy and download

Copy a plain-text summary or exact patch when eligible. Downloads use fixed filenames and temporary local browser URLs.

One example from start to finish

Complete example

The example changes one description word and expands the second sentence:

Original
Foxger creates useful browser tools.
The tools work locally.
Revised
Foxger creates practical browser tools.
The tools work locally and require no account.

In Words mode, useful can appear as removed and practical as added. The phraseand require no account is also added. In Lines mode, both complete lines can appear as changed because neither revised line exactly matches its original line.

Neither result is more truthful. Each answers a different textual question. The displayed statistics and similarity percentage therefore depend on the selected mode.

Try this example in Text Compare
Follow along

Compare two versions in 11 steps

Use the two-line Foxger example while learning the direction and controls.

  1. Identify the two versions

    What to do: Decide which text is the starting version and which text is the edited version.

    Why: The labels Added and Removed depend on that direction.

  2. Paste the original

    What to do: Put the earlier version in Original text.

    Why: Removed content is content that appears here but not in the revision.

  3. Paste the revision

    What to do: Put the newer version in Revised text.

    Why: Added content is content that appears here but not in the original.

  4. Choose a mode

    What to do: Begin with Lines, then use Words when you need a closer prose comparison.

    Why: The mode decides what one counted token means.

  5. Review ignore options

    What to do: Leave ignore options off unless the difference is irrelevant to your task.

    Why: An ignored difference is intentionally hidden from the result.

  6. Select Compare

    What to do: Run one bounded comparison after the inputs and options are ready.

    Why: Foxger does not run a costly diff after every keystroke.

  7. Read removals and additions together

    What to do: Look for a removed token followed by an added token in the same area.

    Why: That pair often represents a replacement rather than two unrelated edits.

  8. Check unchanged context

    What to do: Use unchanged text to locate each edit in the document.

    Why: Context helps you understand where a change occurred without claiming what it means.

  9. Try the other view if useful

    What to do: Switch between Inline and Side by side without running the comparison again.

    Why: The data stays the same; only its presentation changes.

  10. Compare again after editing

    What to do: When the stale notice appears, select Compare again.

    Why: The displayed result belongs to the earlier input state until refreshed.

  11. Copy or download the right output

    What to do: Use the text report for a readable record, or an exact Lines patch when available.

    Why: A patch is designed for line-based file changes and is not available for every option set.

Interpret the display

Reading a diff

  1. Confirm the mode so you know what one token represents.
  2. Confirm which input is Original and which is Revised.
  3. Find the first − Removed label.
  4. Look nearby for a + Added label that may form a replacement.
  5. Use = Unchanged content to locate the edit.
  6. Review every change group instead of relying on the percentage alone.
  7. Check whether an ignore option concealed a difference relevant to your task.

A diff reports text structure. A removed sentence followed by an added sentence might be a correction, a paraphrase, or an unrelated rewrite; a person must decide which description fits.

Understand the number

Similarity percentage

Foxger uses this symmetric token formula:

2 × unchanged ÷ (2 × unchanged + added + removed)

Two empty inputs are defined as 100% textually similar. Otherwise, more unchanged tokens raise the percentage and more added or removed tokens lower it. Foxger rounds the result to one decimal place.

Choose what may disappear

Ignore-case and whitespace cautions

Ignore options are useful only when the hidden difference is irrelevant to your review. They do not delete the input, but they change what the result treats as matching.

  • Letter case: March and march can carry different meanings in some contexts.
  • Line whitespace: indentation can matter in code, tables, and outlines.
  • Line endings: CRLF and LF often display alike, but file tooling can treat them differently.
  • Final newline: source-control tools may report it even though a reader cannot see it.

An ignored Lines comparison cannot produce Foxger’s exact unified patch.

Avoid confusion

Common mistakes

  • Reversing the versions. Check Original and Revised before interpreting Added and Removed.
  • Forgetting to refresh. When the stale notice appears, the visible result belongs to earlier text.
  • Choosing Characters first for long prose. Begin with Lines or Words to reduce visual noise and processing work.
  • Treating a replacement as unrelated edits. Read a nearby removal and addition together.
  • Relying on colour. Read the +, −, = symbols and labels.
  • Treating similarity as quality. It counts tokens and does not judge the writing.
  • Ignoring significant spacing. Whitespace can affect code and structured text.
  • Expecting unlimited input. Each side has a 200,000-character limit and bounded processing.
  • Expecting a patch in every mode. Exact Lines comparisons are the eligible case.
Solve common problems

Troubleshooting

The result says it needs refreshing

An input or comparison option changed. Select Compare to calculate a result for the current state.

The comparison reached its processing limit

Keep both texts, switch to Lines, reduce very different content, or review the advanced budget carefully. A larger budget can keep the browser busy longer.

The locale is invalid or unsupported

Use a BCP 47 tag such as en, es, ja, or th. Foxger reports the fallback locale it used.

The patch actions are disabled

Select Lines, turn off case and line-ignore options, and compare exact texts that contain at least one change.

Different software shows another result

Confirm the token mode, locale, line-ending treatment, final newline, and whitespace settings. Comparison algorithms can group equal edits differently.

Copying is unavailable

Browser clipboard permission or the page context may prevent copying. Use the local report or patch download instead.

A long line looks wider than the panel

Scroll inside the diff result. The page itself should remain within the viewport.

Terms to remember

Glossary

Addition
Text found in the revised version but not in the matching part of the original.
Character
A small text unit used by Character mode. Some visible symbols can contain more than one Unicode code point.
Diff
A structured description of textual differences between two versions.
Line
Text between line-break characters. A line can be empty.
Original
The earlier or starting text in this comparison.
Patch
A plain-text line-based description that software can use to reproduce exact file changes.
Removal
Text found in the original version but not in the matching part of the revision.
Revised
The newer or edited text in this comparison.
Sentence
A language-sensitive text segment that a browser identifies as sentence-like.
Similarity
A percentage calculated from added, removed, and unchanged tokens. It does not measure meaning.
Token
One counted unit in the selected mode, such as a line, word, sentence, or character.
Unchanged
Text that the comparison matched in both versions.
Whitespace
Spacing characters such as spaces, tabs, and line breaks.
Word
A language-sensitive segment marked as word-like by the browser and comparison library.
Optional practice

Practice exercise

Compare the guide example, then open the observations
  1. Select Load example near the top of this page.
  2. Review the Lines result in Inline view.
  3. Switch to Side by side.
  4. Choose Words and select Compare.
  5. Find the replacement of useful with practical.
  6. Add one capital letter to Revised, observe the stale notice, then compare again.
  7. Enable Ignore letter case and review whether that edit remains visible.

Observations to check

Lines mode treats each edited line as a larger unit. Words mode isolates smaller prose edits.

Switching the view does not make the result stale. Changing text or an option does.

Ignore letter case can hide the capitalisation edit, which shows why ignore options need review.

Final review

Final checklist

  • I placed the earlier version in Original and the edited version in Revised.
  • I know what a token means in my selected mode.
  • I reviewed every enabled ignore option.
  • I selected Compare after the latest edit.
  • I read Added, Removed, and Unchanged labels rather than colour alone.
  • I reviewed change groups instead of relying only on similarity.
  • I understand that similarity compares text tokens, not meaning.
  • I know different modes and browsers can group changes differently.
  • I chose a report or exact patch that fits my task.
  • I know Foxger does not save or upload either text.
Back to Text Compare
Quick answers

Text Compare questions

Does Foxger upload or save the text I compare?

No. Both texts are compared by code running in your browser. Foxger does not add them to the page address or store them in browser storage. Standard page and asset requests still reach Cloudflare when the page loads.

Which comparison mode should I choose?

Start with Lines for documents, lists, or code. Words can make edited prose easier to read, Sentences can show larger rewritten passages, and Characters can find small spelling or punctuation changes.

Does the similarity percentage compare meaning?

No. It uses the added, removed, and unchanged tokens from the selected comparison mode. Two passages with the same meaning but different wording can receive a low percentage.

Why do different modes show different changes?

Each mode divides text into different tokens. A changed sentence may be one sentence token, several word tokens, or many character tokens, so its counts and highlighted groups can differ.

What do the ignore options change?

Ignore letter case can hide capitalisation changes. In Lines mode, the whitespace and final-newline options can hide selected formatting differences. Review these choices before relying on a result.

Can I create a patch file?

A unified patch is available for an exact Lines comparison when a change exists. It is unavailable when case, line whitespace, or final-newline differences are ignored because those settings no longer describe an exact file change.

Why can a comparison stop before producing a result?

Very large or very different texts can require substantial work. Foxger limits each input to 200,000 characters and also uses a time and edit-length budget to protect the browser tab.

Can Foxger tell which revision is better?

No. The tool shows textual additions, removals, and unchanged content. It does not check facts, grammar, writing quality, or the author’s intention.

Source material

Official references

These primary sources document the local comparison library and browser APIs used by this tool.

Back to Text Compare
Optional support

Help keep Foxger useful

Foxger tools are free, private, and built without display ads. Optional support helps keep them maintained, tested, and documented.

Support Foxger