ComparLab

Comparison Methodology

ComparLab uses transparent, format-appropriate rules so you can understand why a value is marked as added, removed, or unchanged.

Text and source-code differences

Text, code, SQL, and Java comparisons can operate at line, word, or character precision. Line mode is useful for rewritten blocks and source files. Word mode exposes edits within prose, while character mode is suited to punctuation, identifiers, and short strings.

Optional cleanup can normalize line endings, collapse whitespace, ignore blank lines, or compare lowercase forms. These choices affect the comparison result but do not rewrite the original input fields.

List membership

The list tool treats each line as one item, then reports values only in A, only in B, and in both. When duplicates are ignored, each membership value is reported once. When duplicates matter, occurrences are paired one by one and excess copies remain on their source side. Options also control surrounding whitespace, empty lines, letter case, and output sorting.

JSON comparison

Both documents must parse as valid JSON. ComparLab keeps number tokens as exact text during normalization, so large integers and high-precision decimals are not rounded by JavaScript. Object keys can be sorted recursively before comparison so property order and indentation do not create false changes. Array order remains significant because position can carry meaning in rankings, coordinates, and ordered API data.

XML comparison

XML is validated before comparison. Numeric-looking text and attribute values stay as strings, including leading zeros and large identifiers. Attribute order is normalized, and indentation-only whitespace can be removed when that option is selected. Element order, mixed content, element names, attribute values, and text content remain meaningful. External resources are not fetched.

YAML comparison

YAML inputs are parsed using a safe core schema and formatted consistently before comparison. Custom executable tags are not run. Mapping order and sequence order remain visible in this version.

Limits and responsible review

Plain-text files are limited to 5 MB per side, and very large comparisons pause live recomputation to protect browser responsiveness. Semantic meaning depends on context, so security-sensitive, legal, financial, and production changes should always receive human review.

See the privacy policy for data-handling details or report a comparison problem.