Compare two JSON structures side by side and view differences in a git-style unified diff. Format, minify, and analyze changes between JSON objects instantly.

Original
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Modified
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

Both JSONs are formatted before comparison. The diff view shows line-by-line changes like a git diff. Drop .json files directly onto the panels.

Why Use JSON Comparer?

When working with API responses, configuration files, or any JSON data, understanding what changed between two versions is critical. Unlike property-level diff tools, this comparer shows a familiar git-style unified diff view, making it easy to see exactly which lines were added, removed, or unchanged. You can also format and minify your JSON directly in the editor before comparing.

Frequently Asked Questions

How is this different from JSON Diff?
JSON Diff shows property-level changes (which keys were added, removed, or modified). JSON Comparer shows a line-by-line unified diff view similar to what you see in git, GitHub, or code review tools.
Can I format the JSON before comparing?
Yes! Each panel has format and minify buttons. The tool also auto-formats both JSONs during comparison to ensure consistent formatting for accurate line-by-line diff.
How are nested objects compared?
Both JSONs are pretty-printed with consistent indentation, then compared line by line. This means nested changes appear clearly with their full context in the diff view.
Can I copy the diff output?
Yes, use the Copy Diff button above the diff view to copy the entire diff in standard unified diff format with +/- prefixes.
What happens if the JSON is invalid?
The tool will show an error message if either input contains invalid JSON. Use the format button to quickly check if your JSON is valid.