格 千格 KiloCell

Text comparison tools

Compares the difference between two texts in a light-lighted, real-time coloured way. Supports the comparison mode of the left and right columns, which provides three dimensions: rows, word and character.

Text differences

Original (left) 0 Lines
Modified (right) 0 Lines
Original version / deleted
Modify Version / Added

How to efficiently compare the two texts and identify differences

Text comparison (usually referred to as diffing ) is one of the most basic operations in software development, content creation, legal review and data validation. Intuitive visual differences are essential whether you want to see whether the terms of the contract have been changed, whether you want to verify that the configuration file has been modified correctly or if you want to review the editorial marks of the document.

Know different contrast levels (Granularity)

Our tools provide three different contrast models of precision to fit different scenarios:

  • Line-level: Line by Line. Each line is marked as identical, added or deleted. It's the most common model, and so is it. git diff . The default method for specialized tools. It's very appropriate for code review and long document comparison.
  • By word (Word-level): In the rows where the change occurs, the tool will further highlight specific changes in words or phrases. This makes it very easy to identify minor editing in long paragraphs, for example, by replacing only one word in one sentence.
  • By character (Character-level): The most fine pattern, every change is marked. This is useful for detecting spelling errors, redundant spaces or minor changes in the labels, which may not be apparent at word level.

Double-bar view vs. Merge View

The tool supports two main modes of display:

  • Left-and-right column view (Spit View): Displays the original text and the modified text in the two rows of the left and right. The line will automatically align with the line, and the deletions on the left will correspond to the additions on the right. If you need to look at both versions at the same time, this is the ideal option.
  • Merged View (Unified View): Show it in a single panel. Deleted rows displayed and carried in red background - Prefix, new rows displayed and tied in green background + Prefix. This format is usually used for Patch files, which are read more consistently.

Advanced Options: Ignore Case and Space

Two support options help you filter out unnecessary interference:

  • Ignore case: Capital letters and lowercase letters are considered to be the same. For example, “Hello” and “hello” would be considered to be entirely consistent. This is very useful when comparing code identifiers or not focusing on the layout content.
  • Ignore spaces: Multiple consecutive spaces are merged before comparison and blank characters at the beginning and end of the line are removed. This eliminates the " false differences " that arise from the excess spaces after code indentation, formatting or punctuation.

Common practical applications

  • Legal contract review: A quick comparison of the two versions of the contract would be made to identify in an instant which provisions were added, deleted or modified between the drafts.
  • Code Match: In the absence of Git repository, quickly find the difference between the scripts or the configuration files of the two versions.
  • Academic and writing: Compare the first draft with the revised draft, track the editing trail and ensure that no important material is accidentally removed during the revision process.
  • Data validation: Before combining data, verify whether the two exported data files are consistent or why they are different.
  • Translation match: Compare the original text with the translation and check for missing paragraphs.

Algorithms: LCS algorithms

The core of the text comparison tool is Maximum common subsequence (Longest Common Subsequence, LCS) Algorithms. For two sequences, LCS The longest sequence of elements that appear in both and in the same order is found. Then tag the first sequence that doesn't belong to the LCS. , and the second sequence is marked with the element that does not belong to the LCS.

For example, comparison [A, B, C, D] and [A, C, D, E] - Their LCS is... [A, C, D] 。 So, the tool will decide. B ♪ been deleted, and ♪ E It's new.

Common issues (FAQ)

Can I compare PDF or Word documents?
Can not upload file: %s %s You need to extract text first from PDF or Word (usually Ctrl+A select →) Copy) and then paste two versions into this tool. This tool only handles plain text.
Does the text in the comparison have a length limit?
Although there are no mandatory limits, the performance of the contrast algorithm can decline for super-long text (tens of KiloCell of lines or more). For mega-papers, a comparison of suggested subparagraphs is provided.
Why do similarity percentages sometimes look inaccurate?
The similarity fraction is calculated on the basis of the proportion of the variable line to the total line. For very short texts, even if the content is very similar, the percentage would appear to be low as long as each line changes.
Two panels support synchronized scrolling?
Support. In double-bar view mode, scroll one panel and the other automatically follow the same position, allowing you to match lines.