I mean, you could stringify them both and check if they are equal or not… would be a quick and dirty way. Answer from Thalimet on reddit.com
GitHub
github.com › relex › json-diff-react
GitHub - relex/json-diff-react: A React.js component that renders a structural diff of two JSON values · GitHub
A React.js component that renders a structural diff of two JSON values. Written in TypeScript except for the JavaScript code inherited from the original json-diff library.
Starred by 8 users
Forked by 2 users
Languages TypeScript 55.5% | JavaScript 39.0% | Shell 4.6%
Reddit
reddit.com › r/reactjs › is there a library that allows to easily do diffchecks between two json?
r/reactjs on Reddit: Is there a library that allows to easily do diffchecks between two json?
October 13, 2022 -
I am wondering if there's something that allows you to easily display differences between two json like on diffchecker.com. Is there a library that allows you to easily do that?
reactjs - React library to display unified diff between two strings - Stack Overflow
I am looking for a React component that shows a unified git-like diff between two strings (specifically, two different JSON snippets). Like this: I am currently using the react-ace diff component,... More on stackoverflow.com
Is there a library that allows to easily do diffchecks between two json?
I mean, you could stringify them both and check if they are equal or not… would be a quick and dirty way. More on reddit.com
Any react JSONeditor that can highlight difference between two objects?
https://microsoft.github.io/monaco-editor/playground.html#creating-the-diffeditor-navigating-a-diff Monaco has a diff editor, in which I had also used for comparing JSON files. More on reddit.com
Redux and RFC 6902 JSON-patch?
The jsonpatch docs actually indicate that it does NOT mutate the object unless specified via flag: mydoc = { "baz": "qux", "foo": "bar" }; thepatch = [ { "op": "replace", "path": "/baz", "value": "boo" } ] patcheddoc = jsonpatch.apply_patch(mydoc, thepatch); // patcheddoc now equals {"baz": "boo", "foo": "bar"}} And that's all you need for basic use. If the patch is invalid or won't apply then you'll get an error thrown. The original doc is NOT mutated so you can use it for other things afterwards, mutating the document is supported via a flag if you need it More on reddit.com
GitHub
github.com › utkuakyuz › virtual-react-json-diff
GitHub - utkuakyuz/virtual-react-json-diff: A lightweight diff viewer for JSON files in React applications
Starred by 14 users
Forked by 2 users
Languages TypeScript 85.1% | CSS 12.5% | JavaScript 2.4% | TypeScript 85.1% | CSS 12.5% | JavaScript 2.4%
CodeSandbox
codesandbox.io › examples › package › react-json-view-compare
react-json-view-compare examples - CodeSandbox
json-diff-visualize (forked) briangyetko · gallant-banzai-du93q · haytem.haiderFind more examples or templates · AboutReact json compare view plugin, supports expansion and hiding.use react hooks.18,574Weekly Downloads · Latest version2.0.2 · LicenseMIT ·
npm
npmjs.com › package › react-json-view-compare
react-json-view-compare - npm
import ReactJsonViewCompare from 'react-json-view-compare'; const oldData = { name: 'super', age: 18, task: [ { name: 'eat', time: '09:00' }, { name: 'work', time: '10:00' }, { name: 'sleep', time: '22:00' } ] }; const newData = { name: 'coolapt', age: 20, task: [ { name: 'eat', time: '09:00' }, { name: 'work', time: '10:00' }, { name: 'sleep', time: '23:00' }, { name: 'running', time: '08:00' } ] }; function App() { return <ReactJsonViewCompare oldData={oldData} newData={newData} />; } ReactDOM.render(<App />, document.getElementById('root'));
» npm install react-json-view-compare
Published Mar 30, 2023
Version 2.0.2
Author coolapt
npm
npmjs.com › package › json-diff-kit
json-diff-kit - npm
November 23, 2025 - import { Differ } from 'json-diff-kit'; // or if you are using vue, you can import the differ only import Differ from 'json-diff-kit/dist/differ'; // the two JS objects const before = { a: 1, b: 2, d: [1, 5, 4], e: ['1', 2, { f: 3, g: null, h: [5], i: [] }, 9], m: [], q: 'JSON diff can\'t be possible', r: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', s: 1024, }; const after = { b: 2, c: 3, d: [1, 3, 4, 6], e: ['1', 2, 3, { f: 4, g: false, i: [7, 8] }, 10], j: { k: 11, l: 12 }, m: [ { n: 1, o: 2 }, { p: 3 }, ], q:
» npm install json-diff-kit
Published Mar 03, 2026
Version 1.0.35
Author Rex Zeng
Repository https://github.com/RexSkz/json-diff-kit
npm
npmjs.com › package › json-diff-react
json-diff-react - npm
A React.js component that renders a structural diff of two JSON values. Written in TypeScript except for the JavaScript code inherited from the original json-diff library.
» npm install json-diff-react
Published Mar 20, 2023
Version 1.0.1
Author Joonas Laukka
Repository https://github.com/relex/json-diff-react
GitHub
github.com › 5SSS › react-json-view-compare
GitHub - 5SSS/react-json-view-compare: compare json data,json viewer(demo:https://codesandbox.io/s/jovial-meadow-v17pw)
import ReactJsonViewCompare from 'react-json-view-compare'; const oldData = { name: 'super', age: 18, task: [ { name: 'eat', time: '09:00' }, { name: 'work', time: '10:00' }, { name: 'sleep', time: '22:00' } ] }; const newData = { name: 'coolapt', age: 20, task: [ { name: 'eat', time: '09:00' }, { name: 'work', time: '10:00' }, { name: 'sleep', time: '23:00' }, { name: 'running', time: '08:00' } ] }; function App() { return <ReactJsonViewCompare oldData={oldData} newData={newData} />; } ReactDOM.render(<App />, document.getElementById('root'));
Starred by 45 users
Forked by 15 users
Languages JavaScript 81.5% | CSS 16.8% | HTML 1.7% | JavaScript 81.5% | CSS 16.8% | HTML 1.7%
GitHub
github.com › RexSkz › json-diff-kit
GitHub - RexSkz/json-diff-kit: A better JSON differ & viewer, support LCS diff for arrays and recognise some changes as "modification" apart from simple "remove"+"add". · GitHub
import { Differ } from 'json-diff-kit'; // or if you are using vue, you can import the differ only import Differ from 'json-diff-kit/dist/differ'; // the two JS objects const before = { a: 1, b: 2, d: [1, 5, 4], e: ['1', 2, { f: 3, g: null, h: [5], i: [] }, 9], m: [], q: 'JSON diff can\'t be possible', r: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', s: 1024, }; const after = { b: 2, c: 3, d: [1, 3, 4, 6], e: ['1', 2, 3, { f: 4, g: false, i: [7, 8] }, 10], j: { k: 11, l: 12 }, m: [ { n: 1, o: 2 }, { p: 3 }, ], q:
Starred by 209 users
Forked by 17 users
Languages TypeScript 92.7% | Less 4.7% | JavaScript 2.6%
GitHub
github.com › bluepeter › jsondiffpatch-react
GitHub - bluepeter/jsondiffpatch-react: Diff & patch JavaScript objects... in React
<JsonDiffReact left={left} right={right} objectHash={(obj: any) => obj.id || obj._id || obj.name || JSON.stringify(obj) } />
Starred by 12 users
Forked by 4 users
Languages JavaScript 100.0% | JavaScript 100.0%
GitHub
github.com › matteotrapani › virtual-react-json-diff-react19
GitHub - matteotrapani/virtual-react-json-diff-react19: A lightweight diff viewer for JSON files in React applications
A lightweight diff viewer for JSON files in React applications - matteotrapani/virtual-react-json-diff-react19
Author matteotrapani
Netlify
virtual-react-json-diff.netlify.app
Virtual React JSON Diff Demo
We cannot provide a description for this page right now
GitHub
github.com › udamir › api-diff-viewer
GitHub - udamir/api-diff-viewer: React component to view difference between two Json based API documents · GitHub
Starred by 45 users
Forked by 2 users
Languages TypeScript 98.1% | CSS 1.8% | JavaScript 0.1%
GitHub
github.com › shripatil70 › json-diff-viewer
GitHub - shripatil70/json-diff-viewer: 🧩 JSON Diff Viewer — A lightweight React + TypeScript tool to visually compare two JSON files side-by-side with color-coded differences, live updates, dark/light mode, and zero UI libraries.
🧩 JSON Diff Viewer — A lightweight React + TypeScript tool to visually compare two JSON files side-by-side with color-coded differences, live updates, dark/light mode, and zero UI libraries. - shripatil70/json-diff-viewer
Author shripatil70
Top answer 1 of 2
8
Try either "react-diff-view" or "react-diff-viewer".
The "react-diff-viewer" is quite simple to use/implement while the "react-diff-view" offers some more advanced features.
It's up to you, here the links: https://www.npmjs.com/package/react-diff-viewer https://www.npmjs.com/package/react-diff-view
2 of 2
7
react-diff-viewer-continued might be what you are looking for since 'react-diff-view' is no longer having updates and is not compactable for react 18^.
GitHub
github.com › johnwdunn20 › react-jsondiff
GitHub - johnwdunn20/react-jsondiff: Display json diffs in react. Based on jsondiffpatch
Now as it's own module, this component can easily be installed into any react app: ... <JsonDiff oldJson={{ a: 1, b: 2, c: 4, d: ["hello", "world"], nested: { e: 5, f: 6, h: ["goodbye", "world"], i: 8 }, }} currentJson={{ a: 1, b: 2, c: 3, d: ["hello", "everyone"], nested: { e: 5, f: 6, g: 7, h: ["goodbye", "everyone"] }, }} isHidden={false} // set to true to hide unchanged fields, false to show all fields />
Author johnwdunn20