← All APIs json

JSON Validate, Repair, Convert, Query & Diff API

Validate, repair, format, query, diff, convert, and canonicalize JSON in one call.

Every agent and developer hits broken or confusing JSON. This tool handles the common headaches in one place: check whether JSON is valid with the exact error location, repair near-JSON with typos, pretty-print or minify, pull values out with a path expression, diff two documents, convert to and from YAML or CSV, produce a byte-stable canonical form for hashing, validate against a schema, and report size and structure. Same input, same output, no side effects.

POSThttps://json-suite.underscoredone.com/json
Pricing

$0.01 per request — pay via x402/USDC. No account needed.

How to use

Send the 'op' field to choose what to do. Use 'data_raw' (a plain string) only for 'validate' and 'repair' - these two need the original broken text. Use 'data' (actual parsed JSON) for all other operations: format, canonicalize, convert, query, diff, patch, schema, stats. For 'diff' and 'patch', put the first document in 'data' and the second in 'options.data_b'. For 'query', put your JSONPath expression (e.g. '$.items[*].id') in 'options.jsonpath' or a JSON Pointer (e.g. '/items/0/id') in 'options.pointer'. For 'convert', set 'options.to' to 'yaml', 'csv', 'ndjson', or 'json'. For 'schema', put the JSON Schema object in 'options.schema'. For 'format', set 'options.indent' (number, default 2) and 'options.sort_keys' (true/false). For 'canonicalize', no extra options needed - output is RFC 8785 JCS bytes as a string. The 'repair' operation is heuristic: it always returns 'fixes_applied' so you can audit what changed. Check the 'valid' field first in every response. On a 400 error, read 'detail' for a plain-English explanation of what went wrong.

Input parameters
NameTypeRequiredDescription
opstringyesWhat you want to do. Choose one of: validate, repair, format, canonicalize, convert, query, diff, patch, schema, stats.
data/nullnoThe JSON value you want to work with - can be an object, array, string, number, or anything valid. Required for all operations except validate and repair.
data_rawstring/nullnoThe raw text you want to validate or repair. Use this instead of data only for validate and repair, because those need to see the original broken text exactly as-is.
optionsobject/nullnoExtra settings for the chosen operation. For example: indent, sort_keys, jsonpath, pointer, to (for convert), schema, data_b (for diff/patch). All optional - sensible defaults are used.
Example response
{
  "api_version": "1.0.0",
  "op": "query",
  "valid": true,
  "matches": [
    {
      "path": "$.order.items[0].sku",
      "value": "BIL-CUE-07"
    },
    {
      "path": "$.order.items[1].sku",
      "value": "BIL-CHALK-01"
    }
  ],
  "match_count": 2
}
Error responses
StatusMeaning
400Bad request — your input failed validation or could not be processed. Check the detail field for specifics.
402Payment required. Send a signed USDC payment on Base Mainnet or Solana Mainnet using the x402 protocol.
422Unprocessable — a required field is missing or the wrong type. Check the detail field for specifics.
Links