711
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.
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.

How do I use this prompt?

1) Copy the prompt with the copy button. 2) Replace every bracketed variable with your real details. 3) Paste it into your AI assistant. 4) Compare the answer with the example output and ask for changes if needed.

What output should I expect?

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

/ continue exploring

Related concepts

The vocabulary this page depends on.

  • →Prompt Chaining

    Pipelining LLM calls where each step's output feeds the next.

  • →Few-Shot Prompting

    Showing the model 2–5 examples of the task inside the prompt so it mirrors the pattern.

  • →System Prompt

    A high-priority instruction that sets the model's role, tone and constraints for the whole conversation.

  • →JSON Mode

    A model setting that guarantees valid JSON output.

all dictionary →

Related prompts

Reusable prompts for this job.

all prompts →