Diferencia JSON
Compara dos documentos JSON y ve exactamente qué cambió — agregado, eliminado y modificado.
Respuesta rápida: Diferencia JSON: compara dos documentos JSON y descubre exactamente qué ha cambiado: elementos añadidos, eliminados y modificados. Funciona por completo en tu navegador, gratis y sin registro.
Última actualización
Bueno saber
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.
Preguntas frecuentes
- ¿Cómo maneja el orden de las claves?
- Las claves se comparan por nombre, no por posición — dos objetos con las mismas claves en diferentes órdenes son iguales.
- ¿Qué hay del orden de los arreglos?
- Los arreglos se comparan posicionalmente — el diff los trata como ordenados. Si deseas semántica de conjunto, ordena ambos arreglos primero.
- ¿Los documentos JSON enormes serán lentos?
- El diff es O(n) en el más pequeño de los dos árboles, por lo que los documentos de varios megabytes finalizan en menos de un segundo.
- ¿Mis archivos JSON se suben?
- No — la comparación se ejecuta completamente en tu navegador. Incluso JSON confidencial es seguro de pegar aquí.
- ¿Puedo exportar el diff?
- Sí — copia las líneas de diff o descárgalo como JSON para usarlo en una revisión de código o informe de cambios.