ChatGPT to JSON

Export ChatGPT to JSON for Backup and Automation

Export conversation data as JSON for backups, scripts, and analysis.

ChatShell exporting a ChatGPT conversation to JSON

When JSON is the right format

Automation and scripts

Read the file with Python, Node.js, or jq to search, filter, or transform conversations.

Structured conversation archives

JSON preserves structured conversation data for your own scripts. It does not guarantee that ChatGPT or another service can restore the conversation from the file.

Analysis and migration

Move conversations into databases, search indexes, or other tools without scraping text.

Not the best for reading

For something a person can read quickly, export PDF, DOCX, or Markdown.

How to export ChatGPT to JSON

  1. Open the ChatGPT conversation you want to keep on chatgpt.com and let it finish loading.
  2. Click the ChatShell icon in the Chrome toolbar. On first use a welcome page explains local processing and asks for your consent before ChatShell reads any ChatGPT data.
  3. In the Current Chat panel, choose JSON as the export format.
  4. Adjust the options you need in Preferences, such as the language or timestamps, which are paid-only options.
  5. Click export. The file is generated in your browser and downloaded to your usual downloads folder.

What the JSON file looks like

The export contains the conversation's own data structure. The top-level fields are the title, conversation id, export time, source URL, and the mapping of message nodes plus current_node. This is a shortened example:

{
  "title": "Reverse a list in Python",
  "id": "...",
  "exportedAt": "2026-10-02T09:30:00.000Z",
  "url": "https://chatgpt.com/c/...",
  "mapping": {
    "node-id": {
      "id": "node-id",
      "parent": "parent-node-id",
      "children": ["child-node-id"],
      "message": { "author": { "role": "user" }, "content": { "parts": ["..."] } }
    }
  },
  "current_node": "last-node-id"
}

Each node links to its parent. To read the conversation in order, start at current_node and follow the parent links back to the first message, then reverse the list. Attachment details are added when the conversation has files.

Common problems and fixes

The messages look out of order

The mapping is a tree. Walk from current_node up through parent links and reverse the result.

The file is large

JSON can include message nodes and metadata returned by ChatGPT. Compress it or extract only the text fields you need.

Parsing fails

Open it in a JSON validator first. The file is plain UTF-8 JSON, so editors that guess another encoding can break it.

Some fields are empty

Fields depend on what ChatGPT returns for that conversation, so handle null values in your code.

When ChatGPT to JSON is the right export

Automation pipelines

Use JSON when the next step is another system, script, or workflow that needs structured input rather than a final document.

Structured backups

Preserve message fields and relationships for search and transformation. Restoring a chat requires a separate compatible import tool; this file does not provide one.

Migration and analysis

Move ChatGPT content into downstream tools for analysis, ETL, or custom dashboards without re-parsing raw text.

Developer workflows

Keep exports in a format that can be validated, transformed, and versioned alongside the rest of a technical workflow.

Why JSON is better for systems than screenshots

Structured data

JSON is aimed at preserving fields and machine-readable content rather than only the visible presentation.

Automation-ready output

It becomes far easier to transform, index, validate, or move the export into later pipelines.

Migration-friendly backup

JSON exports are a stronger base for migration or analysis work than screenshots or plain copied text.

Local-first processing

The structured export is generated in the browser rather than being pushed to another hosted conversion tool.

ChatGPT to JSON questions

What does the JSON export contain?

The conversation title, id, export time, source URL, the message mapping, and the current node. Attachment details are added when files exist.

How do I read the messages in order?

Start at current_node, follow each node's parent link back to the root, and reverse the list.

Can I import the JSON back into ChatGPT?

ChatShell does not provide a restore-to-ChatGPT feature. Use the JSON for your own archives and scripts; do not assume another service can import its structure unchanged.

Is JSON export processed locally?

Yes. The file is created in your browser, and conversation content is not sent to ChatShell servers.

Explore other export formats