How it works
Start a comparison
Paste the two inputs you want to compare into the left and right editors, or drop a file into each editor. Check the format selected for each side, then select Compare. To explore the tool first, use load example below Compare. Format and Clear affect only their corresponding editor.
What the tool compares
The tool compares parsed values, ignoring formatting and object property order. Automatic alignment (the default) aligns similar array items and ignores their order, including in nested arrays. Compare by position compares items at the same index. Duplicate items still count.
Read the result
The diff uses the left input as its reference: red marks removals and green marks additions needed to reach the right input. Different values appear as a removal and an addition, with the differing segment emphasized. This direction is a display convention; the inputs need not represent earlier and later versions. The result shows normalized data, so its order and formatting can differ from what you pasted. An equivalent result means no differences were found under these comparison rules; the original texts may still differ. Select Back to edit your inputs again.
Choose an input format
Each editor accepts JSON, JSONL or a limited subset of YAML. JSONL requires one complete JSON value per nonempty line; blank lines are skipped. JSONL records are compared as an array using the selected array comparison mode. If both sides use the same format, the result is displayed in that format. If the formats differ, the parsed values are compared and the result is displayed in JSON. Comments and original formatting are not preserved.
When order matters
Choose Compare by position for sequences, rankings or histories where order matters. Automatic alignment is useful for unordered collections.
Other limits
YAML support covers common mappings, sequences and simple flow collections; it does not implement the full YAML specification. For complex YAML, convert the documents to JSON with a full YAML parser before comparing. Numbers use JavaScript precision: very large integers can lose digits, so represent exact identifiers as strings. Large inputs can slow the browser or exceed available memory.
Examples
Same content
Under automatic alignment, these inputs are equivalent: the keys and array items changed order, but the values and their counts are unchanged.
{"a": 1, "b": [1, 2]}{"b": [2, 1], "a": 1}Different values
The same field has different values: 10 on the left and 20 on the right. The comparison highlights the value difference even though the structure is the same.
{"value": 10}{"value": 20}Different counts
The value 1 occurs twice on the left and once on the right. Ignoring array order does not ignore how many times each value occurs.
[1, 1, 2][1, 2]