GALAXY OF TOOLS

AI SECTOR

JSON Prompt Extractor

Read every prompt in ChatGPT/Claude exports, API files and AI images — or rescue broken JSON from AI answers.

Open a file ChatGPT or Claude export (.zip or conversations.json), API request/response .json, batch .jsonl, or a Stable Diffusion / ComfyUI PNG — read on this device

#SourceRoleTextTime · model

Exports contain the rows that match the search and role filter.

Files and text are read in your browser — exports, API files and images are never uploaded. Opening a ZIP loads the JSZip library from cdnjs; nothing else is fetched.

A JSON prompt extractor for chat exports, API files and AI images

This JSON prompt extractor does two jobs. Extract prompts reads the files that hold your AI conversations and requests — a ChatGPT or Claude data export, an OpenAI, Anthropic or Gemini request body, a Batch API JSONL file, or a PNG made by Stable Diffusion or ComfyUI — and lists every system, user and assistant message in one searchable table you can save as CSV, JSONL or Markdown.

Extract JSON from AI output finds the JSON inside a model’s answer, even when it is wrapped in chatter, fenced as code, or cut off half-way, repairs the usual mistakes, tells you exactly what it fixed, and can check the result against a JSON Schema.

How to extract prompts or JSON

  1. Choose Extract prompts or Extract JSON from AI output.
  2. For prompts, open a file (an export .zip, conversations.json, .json, .jsonl or .png) or paste JSON; the detected format is shown above the table.
  3. Search the text or filter by role, then export the rows as CSV, JSONL or Markdown.
  4. For JSON, paste the AI’s answer; pick a block if several are found and read the list of repairs.
  5. Open Check against a JSON Schema to validate the result, then copy or download it.

JSON Prompt Extractor features

Export-aware

ChatGPT’s conversation tree is followed from the latest message back to the start, so regenerated answers you discarded are left out.

Every major API shape

OpenAI Chat Completions and Responses, Batch input and output, Anthropic Messages and Message Batches, Gemini generateContent, Interactions and batch files.

Image prompts

Reads PNG text chunks (tEXt, zTXt, iTXt): AUTOMATIC1111 and Forge “parameters” with settings, and ComfyUI “prompt” or “workflow” traced from the sampler.

Honest JSON repair

Comments, single or curly quotes, unquoted keys, trailing or missing commas, Python True/None, NaN and cut-off output — each fix is listed.

Schema check

Its own validator for the common JSON Schema keywords, with paths such as $.orders[1] for every problem.

Private and offline-friendly

No upload; ZIP files use JSZip (MIT) loaded from cdnjs only when you open one.

Formats it understands

Export formats are not formally documented and change from time to time; this tool follows the field names found in current exports. API shapes follow the OpenAI, Anthropic and Google API references, checked 14 October 2026. Any other JSON still gives up strings stored under keys such as prompt, system, instructions, content or text.

File or bodyWhat is read
ChatGPT export (conversations.json or the .zip)Title, each visible message with its role, time and model; images become [image]; reasoning blocks are left out
Claude export (conversations.json or the .zip)Conversation name, human and assistant messages, attachment names
OpenAI Chat Completions / Responsessystem or developer, user, assistant and tool messages; instructions; output text of responses
OpenAI Batch JSONLEach line’s custom_id with its request body or response
Anthropic Messages / Message BatchesTop-level system, text, tool use and tool result blocks; custom_id per request
Gemini generateContent, Interactions, batch JSONLsystemInstruction or system_instruction, contents and parts, user_input and model_output steps, key per request
AUTOMATIC1111 / Forge PNGPositive and negative prompt, and settings such as Steps, Sampler, CFG scale, Seed, Size and Model
ComfyUI PNG or workflow JSONPositive and negative text traced from each sampler, other text nodes, sampler settings and checkpoint

Worked example: rescuing JSON from an AI answer

The example answer has a comment, single and curly quotes, an unquoted key, a trailing comma, Python’s True, and it stops in the middle of the second order. This tool reports:

  • Removed 1 comment
  • Changed 4 single-quoted strings to double quotes
  • Straightened curly quotes around 1 string
  • Quoted 1 unquoted key
  • Removed 1 trailing comma
  • Changed 1 Python True/False/None to JSON
  • Dropped 1 incomplete key or value at the cut-off point
  • Closed 3 brackets left open at the end (the output was cut off)

and returns this valid JSON:

{
  "name": "Asha Rao",
  "email": "asha@example.com",
  "tags": [
    "vip",
    "beta"
  ],
  "active": true,
  "orders": [
    {
      "id": 1,
      "total": 25.5
    },
    {
      "id": 2
    }
  ]
}

The incomplete "total": is dropped rather than guessed — and the example schema then reports exactly that: $.orders[1] is missing the required “total”. Valid syntax is not the same as complete data, which is why the schema check is worth running. To format larger JSON, use the JSON formatter; to turn rows into a spreadsheet, the JSON to CSV converter.

Where your prompts are inside exports and images

In ChatGPT you request an export under Settings → Data controls; the e-mailed ZIP contains conversations.json. Claude’s export, from Settings → Privacy, also arrives as a ZIP with conversations.json. Open either ZIP here directly.

Stable Diffusion front-ends store the prompt in the PNG file itself, which is why sharing an image can share your prompt. Read it here, and remove it before posting with the EXIF remover. JPEG and WebP images keep prompts in EXIF instead — try the EXIF viewer for those.

JSON Prompt Extractor FAQ

How do I extract prompts from JSON?

Paste the JSON or open the file. This JSON prompt extractor recognises the format, lists every message with its role, and lets you export the prompts as CSV, JSONL or Markdown.

Can I read my ChatGPT history without uploading it?

Yes. Open the export ZIP or conversations.json here; it is read by JavaScript in your browser tab and never sent to a server.

How do I see the prompt of a Stable Diffusion image?

Open the PNG. AUTOMATIC1111 and Forge keep it in a “parameters” text chunk and ComfyUI in “prompt” and “workflow” chunks; the tool shows the positive and negative prompts and the settings. If nothing appears, the image was re-saved without its metadata.

Why did the AI return broken JSON?

Models write JSON as text, so they can add comments, use single quotes, leave a trailing comma, or stop when they hit the output limit. Structured-output features in the APIs prevent most of this; for everything else, this tool repairs and reports the common mistakes.

Does the repair change my data?

Only to make it valid JSON: quotes, commas, comments and brackets. Values cut off at the end are dropped, never invented, and NaN or Infinity become null because JSON cannot store them. Very large integers lose precision, as in any JavaScript program.

Which JSON Schema features are checked?

The common ones: types, enum and const, required and additional properties, array items and lengths, string length, pattern and formats (date, date-time, time, email, uri, uuid), number ranges, the allOf/anyOf/oneOf/not combinators, if/then/else and local $ref. Other keywords are listed as not checked.

You might also need