JSON validator

Check whether text is valid JSON and get the exact line and column of the first error.

Input

The text to check.

Result

Fill in the input and press Run.

Your input is processed in memory and then discarded. It is not stored or logged. Even so, don't paste live passwords or keys into any online tool.

Use it from code or an agent

curl -s https://setget.net/v1/tools/json-validate \
  -H 'Content-Type: application/json' \
  -d '{"input":{"text":"{\"a\": 1}"}}'
import json, urllib.request

body = {'input': {'text': '{"a": 1}'}}
request = urllib.request.Request("https://setget.net/v1/tools/json-validate", json.dumps(body).encode(),
                                 {"Content-Type": "application/json"})
print(json.load(urllib.request.urlopen(request))["result"])
const response = await fetch("https://setget.net/v1/tools/json-validate", {
  method: "POST",
  headers: {"Content-Type": "application/json"},
  body: JSON.stringify({"input":{"text":"{\"a\": 1}"}}),
});
console.log((await response.json()).result);
Tool: run_tool
Arguments:
{
  "slug": "json-validate",
  "input": {
    "text": "{\"a\": 1}"
  }
}
{
  "input": {
    "text": "{\"a\": 1}"
  }
}

Endpoint: POST /v1/tools/json-validate. Over MCP: run_tool with slug: "json-validate". Machine-readable: input schema, Markdown. Connect an agent.

Inputs

NameTypeRequiredWhat it does
text string yes The text to check.

Examples

Input
{
  "text": "{\"a\": 1}"
}
Result
{
  "valid": true,
  "type": "object",
  "error": null
}

A misspelt literal

Input
{
  "text": "{\"a\": tru}"
}
Result
{
  "valid": false,
  "type": null,
  "error": {
    "message": "Expecting value",
    "line": 1,
    "column": 7
  }
}