JSON Utilities

Json Stats

Analyzes JSON structure depth, key counts, data types, and memory footprint. Send JSON via GET /v1/json/stats or use the MCP tool in Cursor and other editors. Returns metrics like max nesting level, total keys, array lengths, and type distribution — perfect for API analysis or when Claude needs to understand complex JSON before processing it.

API Endpoint

GET /v1/json/stats

Code Examples

curl "https://tinyfn.io/v1/json/stats" \
  -H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/json/stats', {
  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/stats',
    headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)

Use via MCP

Add to your AI agent

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"
      }
    }
  }
}

Learn more about MCP setup →

FAQ

What statistics does JSON Stats return?

Returns depth levels, total keys, object/array counts, primitive type distribution, memory size estimates, and largest array/object sizes.

How do I use JSON Stats with MCP in my AI editor?

Available as an MCP tool in Cursor, Claude Code, and other supported editors. AI agents can analyze JSON structure before processing complex data.

Can JSON Stats handle large JSON files?

Yes, but performance depends on complexity. Deep nesting (>20 levels) or objects with thousands of keys will take longer to analyze.

What's the difference between JSON Stats and JSON validation?

JSON Stats analyzes structure and provides metrics, while validation checks syntax correctness. Use Stats to understand data shape and complexity.

Does JSON Stats work with malformed JSON?

No, the input must be valid JSON. Malformed JSON will return a parsing error before statistics can be calculated.

Try Json Stats Now

Get your free API key and start using Json Stats in seconds.

Get Free API Key