API snapshot testing

Input
Output

API Snapshot Testing

Save a response you know is right, and compare every later one with it. Bracely shows what really changed, a value, a type, a field that's new or gone, and leaves out the values that change on every call, like ids, timestamps and request ids, while still checking their types.

Example: an order after a backend change

The same order fetched before and after a release. The new time is left out; total became a string, an item's quantity changed and a field appeared:

The new response

{
  "id": "ORD-20419",
  "status": "paid",
  "total": "4248.50",
  "updatedAt": "2026-10-29T11:42:10Z",
  "items": [
    {
      "sku": "KB-01",
      "qty": 1
    },
    {
      "sku": "MS-07",
      "qty": 2
    }
  ],
  "discount": 0
}

The snapshot

{
  "id": "ORD-20419",
  "status": "paid",
  "total": 4248.5,
  "updatedAt": "2026-10-01T09:00:00Z",
  "items": [
    {
      "sku": "KB-01",
      "qty": 1
    },
    {
      "sku": "MS-07",
      "qty": 1
    }
  ]
}

Output

3 differences from the snapshot
~ $.total: number 4248.5 → string "4248.50"
~ $.items[1].qty: 1 → 2
+ $.discount is new: 0
(1 changing value left out: $.updatedAt)

How do I use the API snapshot testing?

  1. Paste the saved response (the snapshot) in the second box, or paste a good response and press Save as the snapshot.
  2. Paste the new response in the first box.
  3. Read the differences; leave out more with paths like $.meta or key names like updatedAt.

What does the API snapshot testing do?

  • Ids, times and tokens left out, types still checked
  • Lists in the same order, or in any order
  • Leave out any path, key, or item field

When to use the API snapshot testing

Snapshot (or golden file) testing catches the changes nobody meant to make: a field renamed, a number that became a string, a list that lost an item. You keep one response you know is right and compare each new one with it. The hard part is noise: ids, timestamps and request ids differ on every call, so a plain diff is full of changes that don't matter.

Bracely leaves those out by their names (id, createdAt, updatedAt, requestId, token, anything ending in Id or _at) and by their values (ISO timestamps, UUIDs, long tokens), but still checks that each kept its type. Leave out more with Leave out: $.meta for a whole section, updatedAt for a key anywhere, $.items[*].price for a field in every item. Lists are compared in order by default; Lists: any order pairs equal items first, then items with the same id or sku.

Frequently asked questions

How is this different from Diff?
Diff shows every difference between two JSON documents. Snapshot test is for responses: it leaves out values that always change and reports the rest as changes, type changes, new fields and missing fields.
Can I keep several snapshots?
The second box holds one. For more, use API tests: a schema line, or $.field == value lines, per request.
Is my data uploaded?
No. Bracely runs entirely in your browser, so nothing you paste or open leaves your device.

More JSON tools

Bracely has 104 JSON tools in one page. Related ones:

Runs entirely in your browser. Nothing you paste is uploaded. Made by Saurabh Pagrut · About · Privacy policy
Last updated · Version 6.1 · Changelog
Saurabh Pagrut on GitHub · LinkedIn · X · YouTube · Instagram