TextCompareLab
Guide: Compare JSON
How to compare two JSON files or API responses
A changed value in a JSON payload - a version, a flag, a price - is easy to miss when you read the raw text. Pasting both versions side by side shows the exact lines that changed, with the differing value highlighted inside the line.
Steps
- Paste the older JSON in the original box and the newer one in the changed box. This can be two files, two API responses, or a request and a replay.
- Format both sides the same way first. TextCompareLab compares JSON as text, line by line: if one side is minified and the other is pretty-printed, every line looks changed. Run both through the same formatter (your editor, or
jq .) before comparing. - If key order is not meaningful, sort keys on both sides first (for example
jq -S .). Reordered keys are valid JSON but show as removed and added lines in any text comparison. - Run the comparison, then use "Changed lines only" to see just the edits with a few lines of context.
Example
"timeout": 30,
"timeout": 60,
Only the value is marked as changed inside the line, so you can see at a glance that the key stayed the same and 30 became 60.
Tips
- Leave "Ignore case" off: JSON keys and string values are case-sensitive.
- Use "Ignore whitespace" only when indentation differences do not matter to you, for example after two different formatters ran.
- For large payloads, compare the relevant object or array block rather than the whole file - the result is quicker to read.
- TextCompareLab does not parse or validate JSON. It will not flag invalid syntax or compare structure semantically; it shows you the text changes, and the judgment stays yours.
Privacy
The comparison runs in your browser and the text is not uploaded. Even so, do not paste real credentials or personal data. The Copy and Download buttons give you the result as plain text, with lines starting with - from the original and + from the changed text.