Validates JSON syntax and returns a boolean result plus detailed error information. Use via MCP in Cursor or Windsurf, or call GET /v1/json/validate directly. Pass any string to check if it's valid JSON — handles malformed brackets, trailing commas, and syntax errors that break parsers.
curl "https://tinyfn.io/v1/json/validate" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/json/validate', {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://tinyfn.io/v1/json/validate',
headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)
Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's json tools:
{
"mcpServers": {
"tinyfn-json": {
"url": "https://tinyfn.io/mcp/json",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}
Use the validate_json MCP tool in your AI editor, or call GET /v1/json/validate with your JSON string. Returns true/false plus specific error details if invalid.
Catches all standard JSON syntax errors: missing quotes, trailing commas, unclosed brackets, invalid escape sequences, and malformed numbers or booleans.
Yes, it validates deeply nested JSON structures and reports the exact line/position of syntax errors in complex documents.
Empty strings return false (invalid JSON). The string 'null' returns true (valid JSON literal), while actual null/undefined values depend on your implementation.
This tool provides structured validation results without throwing exceptions, making it safer for batch processing and AI agent workflows that need clean boolean responses.
Get your free API key and start using Validate Json in seconds.
Get Free API Key