Go to example tasks

Fix malformed LLM JSON and validate it

Repair broken JSON from ChatGPT, Claude or Gemini outputs (single quotes, trailing commas, code fences, unquoted keys) and validate it against your JSON Schema. Pay only for valid, lossless results.

Try for free
LLM JSON Repair & Schema Validator
LLM JSON Repair & Schema Validatorkadev-code/llm-json-repair
Index
Valid
Repaired JSON
Error
+4 fields
Text
Number
Boolean
List
Object

Input

Texts to repair(required):```json { name: 'Alice', "role": 'Engineer', "skills": ['Python', 'AI',], "active": True, } ``` Hope this helps!+1
Optional JSON Schema:{3 fields}
Extraction Mode:first
Fail on Error:false

Output fields

Index
Valid
Repaired JSON
Error
Issues detected
Loss risk
Warnings
Schema errors

How it works

Sign up on Apify or log in

The LLM JSON Repair & Schema Validator Actor is ready to run with the inputs already set for "Fix malformed LLM JSON and validate it". Sign up or log in and you'll land in Apify Console with a copy of this exact task.

Start the "Fix malformed LLM JSON and validate it" task

The LLM JSON Repair & Schema Validator Actor will start running based on the input automatically. You can also change all the input fields, like texts to repair, optional json schema, and more, to match your specific use case.

Receive the "Fix malformed LLM JSON and validate it" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as index, valid, repaired json, and more.

Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also run the "Fix malformed LLM JSON and validate it" task via API.

Image

Integrate "Fix malformed LLM JSON and validate it" into your workflow

Connect "Fix malformed LLM JSON and validate it" with 100+ integrations, or run it via API or MCP.

Webhook

Webhook

n8n

n8n

Make

Make

Zapier

Zapier

Airbyte

Airbyte

Keboola

Keboola

IFTTT

IFTTT

Hubspot

Hubspot

GDrive

GDrive

Gmail

Gmail

Apify MCP

Apify MCP

GitHub

GitHub

Slack

Slack

LangChain

LangChain

LlamaIndex

LlamaIndex

Flowise

Flowise

Pinecone

Pinecone

OpenAI

OpenAI

Mastra

Mastra

Clay

Clay