JSON Text Tools

Jsonformatter and Text Tools
Home › Guides › How to Read and Debug a JSON API Response

How to Read and Debug a JSON API Response

Updated November 2026

When an API call misbehaves, the cause is usually visible in the response itself. A consistent method finds it quickly.

1. Check the status code first

200 means success, 4xx means the request was wrong (401 not authenticated, 404 not found, 422 invalid data), and 5xx means the server failed. An error status often returns a JSON body explaining why.

2. Confirm it is really JSON

Check the Content-Type header. An HTML error page or an empty body causes "Unexpected token" errors; see how to fix them.

3. Format it

Paste the body into the JSON Formatter. The tree view shows nesting, and the validator confirms the syntax is valid.

4. Look for common data problems

5. Compare with a working response

Format both and use Text Compare to see exactly what differs.

Message here