Diff JSON
Comparez deux documents JSON et voyez exactement ce qui a changé — ajouté, supprimé et modifié.
Réponse rapide: Diff JSON : comparez deux documents JSON et visualisez précisément les changements : éléments ajoutés, supprimés ou modifiés. Fonctionne entièrement dans votre navigateur, gratuitement et sans inscription.
Dernière mise à jour
Bon à savoir
The dotted-path annotation is what makes this more useful than a plain text diff. When the tool reports a change at $.user.address.postcode, you can jump straight to that node in a large document instead of scanning line by line — invaluable when you are comparing two API responses that differ in one buried field, or checking that a config migration touched only what you intended.
Remember the two comparison rules, because they trip people up. Object keys are matched by name, so reordering keys produces no diff — semantically correct, since JSON objects are unordered. Arrays, however, are compared positionally: inserting an element at the front shifts every index and can light up the whole array as changed. When array order is not meaningful in your data, sort both sides first (for example with sort lines on a flattened list) so the diff reflects real content changes.
A subtle gotcha is number formatting. JSON 1.0 and 1 parse to the same numeric value and won't diff, but a value stored as the string "1" is a genuine type change from the number 1 — exactly the kind of contract drift that breaks a strict consumer. The diff surfaces these because it compares parsed values, not raw text.
Since everything is parsed and compared locally, it is safe for confidential payloads, and the output copies cleanly into a pull-request comment or a change report when you need a reviewer to see precisely what moved.
Questions fréquentes
- Comment gère-t-il l'ordre des clés ?
- Les clés sont comparées par nom, et non par position - deux objets avec les mêmes clés dans des ordres différents sont égaux.
- Qu'en est-il de l'ordre des tableaux ?
- Les tableaux sont comparés positionnellement - le diff les traite comme ordonnés. Si vous voulez des sémantiques d'ensemble, triez les deux tableaux d'abord.
- Les gros documents JSON seront-ils lents ?
- Le diff est O(n) sur le plus petit des deux arbres, donc les documents de plusieurs mégaoctets se terminent en moins d'une seconde.
- Mes fichiers JSON sont-ils téléchargés ?
- Non - la comparaison s'effectue entièrement dans votre navigateur. Même les JSON confidentiels sont sûrs à coller ici.
- Puis-je exporter le diff ?
- Oui - copiez les lignes de diff ou téléchargez-les au format JSON pour les utiliser dans une revue de code ou un rapport de changement.