Skip to content

How to Compare Two HTTP Requests on iPhone (JSON Diff)

Find out why one request works and another fails: compare two captured requests side by side on iPhone, with field-level JSON diff and timing.

2 min readHTTPS Capture

“It works when I log in on Wi-Fi but fails on cellular.” “Yesterday’s build was fine.” Debugging often comes down to finding what is different between two requests that should be the same. Comparing two long lists of headers and a JSON body by eye takes ages. HTTPS Capture has a Compare view that highlights the differences for you, on the iPhone.

Start a comparison

Choose one of these:

  • In a request list, touch and hold a request and start a comparison from it, then pick the second request.
  • Tap the Compare requests button in the request list toolbar.

Inside the Compare view you can tap Swap Sides to switch A and B. Replace Side A or Replace Side B picks a different request without starting over. Search by URL or status to find the request you want quickly.

What gets compared

The view starts with a Summary that tells you whether the requests are identical and where they differ. Each area then has its own section:

  • Request: URL, query parameters, headers and body
  • Response: status code, headers and body
  • Timing: the phases (DNS, connect, TLS, waiting, download) for A and B side by side, so you can see which one was slower and where

Field-level JSON diff

When both bodies are JSON, the comparison works field by field instead of line by line. Changed values, added keys and removed keys are highlighted, even when the formatting or key order differs. For other text bodies, you get a line diff in which long runs of identical lines are folded away. Bodies that are too large to diff line by line are compared by size and content.

Turn on Differences Only to hide everything that matches and focus on what changed. Copy either side’s value, or a single line, from the diff.

Typical uses

  • Working vs. failing request: spot the missing header, the expired token or the different parameter.
  • Before vs. after a release: see what an app update changed in an API call.
  • Fast vs. slow: compare timing to tell whether the delay is DNS, connecting, or server processing.
  • Two devices or accounts: capture the same action twice and see exactly what differs.

Next steps

Once you have found the difference, test a fix right away. Use Edit & Send to resend the request with the value changed. See send and resend requests on iPhone. To apply the fix to live traffic, add a rewrite rule.

HTTPS Capture

Capture and decrypt HTTPS traffic on iPhone

App Store

Ready to try it?

HTTPS Capture · Capture and decrypt HTTPS traffic on iPhone

Free on the App Store