JSONShield

API Documentation

Use JSONShield tools programmatically. Free tier: 100 calls/day. Upgrade to Pro for 10,000/day.

Endpoint

POST https://jsonshield.com/api/v1/process

Request Body

FieldTypeRequiredDescription
toolstringYesTool name (see list below)
inputstringYesJSON string to process

Response Examples

json-formatter

{ "result": "{\n  \"name\": \"test\"\n}", "tool": "json-formatter" }

json-validator

{ "valid": true, "tool": "json-validator" }
// or
{ "valid": false, "error": "Unexpected token...", "tool": "json-validator" }

json-fixer

{
  "result": "{\n  \"name\": \"test\",\n  \"valid\": true\n}",
  "fixes": [
    "Converted single quotes to double quotes",
    "Removed trailing commas",
    "Converted Python booleans"
  ],
  "tool": "json-fixer"
}

Rate Limits

PlanDaily LimitPrice
Free100 calls/day$0
Pro10,000 calls/day$12/mo

Code Examples

cURL

curl -X POST https://jsonshield.com/api/v1/process \
  -H "Content-Type: application/json" \
  -d '{"tool": "json-formatter", "input": "{\"name\":\"test\"}"}'

JavaScript

const res = await fetch("https://jsonshield.com/api/v1/process", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    tool: "json-fixer",
    input: "{'name': 'test', 'valid': True,}",
  }),
});
const data = await res.json();
console.log(data.result); // Fixed JSON
console.log(data.fixes);  // ["Converted single quotes...", ...]

Python

import requests

res = requests.post("https://jsonshield.com/api/v1/process", json={
    "tool": "json-to-csv",
    "input": '[{"name":"Alice","age":30},{"name":"Bob","age":25}]'
})
print(res.json()["result"])
# name,age
# Alice,30
# Bob,25

Available Tools

Tool NameDescription
json-formatterPretty-print JSON with 2-space indent
json-validatorValidate JSON and return error details
json-minifyCompress JSON to a single line
json-fixerAI repair: fix trailing commas, single quotes, Python booleans, markdown wrappers
json-to-csvConvert JSON array to CSV format
json-to-yamlConvert JSON to YAML
json-to-typescriptGenerate TypeScript interfaces from JSON

Error Handling

// 400 Bad Request
{ "error": "Missing 'tool' field.", "available": [...] }

// 422 Processing Error
{ "error": "Processing failed: Unexpected token...", "tool": "json-formatter" }

// 429 Rate Limited
{ "error": "Rate limit exceeded...", "limit": 100, "remaining": 0 }
Want API access + no ads? Pro coming soon.