~/tools / 11 / invalid-json-api
Malformed Payload Tester
Every client eventually meets a response that lies: a proxy truncates a body mid-array, a legacy service emits single quotes, or a load balancer returns an HTML 502 page under a application/json header. This tool serves those exact pathologies on purpose, so your response.json() catch blocks and fallback UI get tested before production does it for you. The editor will flag these payloads as invalid — here, that is the point.
— validating —
$ man broken-json
Everything above is encoded into the #data= fragment of the exported URL — deflated and base64url-packed by your browser. Fragments are never sent to any server, so this mock is shareable and private. Paste the URL anywhere: a teammate's browser decodes it identically.
grep -i related-searches
- test invalid json response
- malformed json example payload
- response.json() error handling test
- broken api response simulator
- html instead of json error