456
Prompt

JSON Extractor Prompt

Extract structured JSON from any unstructured text.

1 min readupdated 2026-07-04

/ quick answer

Use for entity extraction, invoice parsing, form intake, etc. Extract structured JSON from any unstructured text.

Extract structured JSON from any unstructured text. Use for entity extraction, invoice parsing, form intake, etc. Copy the prompt below, swap the bracketed variables for your own context, and run it in any capable model. This prompt node is part of the Onexial knowledge graph and links to related concepts, workflows and tools below.
Context
Use for entity extraction, invoice parsing, form intake, etc.
Prompt
Extract the fields from the text into JSON matching this schema:

Schema:
{{schema}}

Text:
{{text}}

Rules:
- Return ONLY valid JSON.
- If a field is missing, use null.
- Never invent values.
Example Output
{ "vendor": "Notion", "amount": 96.00, "currency": "USD", "date": "2026-07-01" }
/ frequently asked

What does the JSON Extractor Prompt prompt do?

Use for entity extraction, invoice parsing, form intake, etc.

Which AI models work with this prompt?

It is model-agnostic: it works with any capable general model. Replace the bracketed variables with your own context before running it.

What output should I expect?

{ "vendor": "Notion", "amount": 96.00, "currency": "USD", "date": "2026-07-01" }.