JSON
JSON Diff / Compare
두 JSON 문서 비교 — 추가, 삭제, 변경된 내용을 각 차이점의 정확한 경로와 함께 표시.
Unlike a plain text diff, JSON Diff compares two documents by structure rather than by line: it understands that key order in an object doesn't matter, and it shows the exact path (e.g. user.address.city) to every difference.
How to use it
- Paste the original JSON into one field and the new version into the other.
- The result lists added, removed, and changed fields with the exact path to each and its old and new value.
- Formatting and key order don't affect the result — only the underlying data structure is compared.
Common uses
- Checking exactly what changed in an API response between two versions or two requests.
- Comparing configuration files (package.json, app settings) across branches or environments.
- Debugging a failing test by precisely comparing the expected and actual JSON output.
Things to keep in mind
Array elements are usually compared by position (index) — inserting one element near the start can show every following item as "changed", even though they merely shifted.
The comparison is structural, not textual — two JSON documents with identical data but different formatting or key order are treated as the same.
자주 묻는 질문
이 JSON 비교 도구는 무엇을 해주나요?
두 JSON 문서를 비교해 추가, 삭제, 변경된 부분을 정확한 경로와 함께 보여줍니다.
배열의 순서만 바꿨는데 왜 "변경됨"으로 표시되나요?
배열 비교는 기본적으로 위치(인덱스) 기준으로 이루어지기 때문에, 요소 내용이 같아도 순서가 바뀌면 "이동"이 아니라 "변경"으로 표시됩니다.
비교하는 두 JSON이 서버로 전송되나요?
아닙니다. 비교 처리는 모두 브라우저의 자바스크립트에서 이루어집니다.
비교 결과에 객체 키의 순서가 반영되나요?
아닙니다. 구조 비교는 데이터 자체 — 필드의 존재 여부, 값, 타입만 확인합니다. JSON 객체에서 키의 순서는 의미상 중요하지 않으므로 결과에 영향을 주지 않습니다.
배열 요소를 위치가 아니라 식별자 기준으로 비교할 수 있나요?
이는 사용하는 비교 알고리즘에 따라 다릅니다. 단순한 diff 도구는 항상 배열 요소를 인덱스로 비교하며, 더 정교한 도구는 id처럼 공통 필드로 객체를 매칭해 삽입이나 삭제를 더 정확히 표시하려 합니다.