ChatGPT Export: Save Chats and History as Markdown
November 11, 2026 · 11 min read
ChatGPT Export: Save One Chat or Your Whole History as Markdown
A ChatGPT export comes in two sizes. For one answer or one chat, copy it and paste it into a Markdown editor, then save a .md file. For everything, request the official data export under Settings, Data controls, and convert the conversations.json file inside the ZIP into one Markdown file per chat.
Which ChatGPT Export Do You Need: One Chat or Your Whole History?
Start with how much you want to keep. Saving a single reply takes seconds, while the full account export can take days to arrive. Here's how the routes compare.
| Route | What you get | How long it takes |
|---|---|---|
| Copy one reply | That reply's text, usually as Markdown | Seconds |
| Copy a whole chat turn by turn | A transcript you assemble yourself | A few minutes |
| Browser Print, then Save as PDF | A PDF of the page as your browser lays it out | Seconds |
| Official data export | A ZIP with your chat history as HTML and JSON | Up to 7 days, per OpenAI |
ChatGPT also has its own share link feature, which gives other people a read-only view of a chat. That's a viewing link, though, not a file you keep.
If you only need a chat or two, the copy route is enough. If you want an archive, or you're closing the account, go straight to the data export.
How Do I Export a ChatGPT Conversation as Markdown?
To export a ChatGPT conversation as Markdown, copy each message and paste it into a Markdown editor under a heading for each speaker. ChatGPT's copy button under a reply usually copies the Markdown source, so headings, lists and tables arrive intact. Our explainer on why AI chatbots answer in Markdown covers the background.
Here's the routine we use for one chat:
- Open the Markdown editor and add a
#title and the date at the top. - Paste your first prompt under a
## Youheading. - In ChatGPT, hover over the reply until its copy button appears, copy it, and paste it under
## ChatGPT. - Repeat for each turn of the conversation.
- Check the preview on the right. Tables and task lists should render, not show as raw pipes and brackets.
- Open the Download/Export menu and choose Download .md.
Selecting the whole page and copying it is quicker, but it usually grabs rendered text rather than Markdown. Bold, tables and code fences tend to flatten out, so the time you save goes into repairing them.
A finished single-chat transcript looks like the example below. Edit it and watch the preview update, then try Download .md from the editor's menu.
Download .md has no length limit and runs in your browser. The editor's Export as PDF and Export as DOCX options are capped at 5,000 characters on the free plan, which a long chat passes quickly.
Requesting the Full ChatGPT Data Export, Step by Step
ChatGPT's official Export data option packages your chat history and account data into one ZIP file. You don't pick individual chats. According to OpenAI's help article on exporting your ChatGPT history and data, as of November 2026 the steps on the web are:
- Sign in to ChatGPT and open Settings from your profile menu.
- Choose Data controls.
- Next to Export data, select Export, then confirm the request.
- Wait for OpenAI's message, usually an email, saying your export is ready.
- Open the link and download the ZIP. Stay signed in to the account that requested it, or the download may fail.
We'd make the request from ChatGPT on the web, where the steps above apply. If you can't find Export data in a mobile app, switch to the browser.
Personal accounts can request the export from their own settings. On a workspace account, such as Business or Enterprise, the option may be missing or turned off, so ask your workspace owner or admin.
How Long Does a ChatGPT Data Export Take?
OpenAI's help article says, as of November 2026, that an export can take up to 7 days to arrive. It doesn't promise anything shorter, so treat any faster turnaround as luck rather than a rule. You get a notification, usually by email, when the file is ready.
The clock that matters more starts after that. Per OpenAI's help article, the download link expires 24 hours after you receive it. If you miss that window, you need to request a fresh export and wait again.
Our advice: request the export when you know you'll check your inbox over the next week. Download the ZIP as soon as the message lands, and copy it somewhere you back up.
What's Inside the Export ZIP: chat.html and conversations.json
The ZIP typically includes two files you'll care about. Other files vary by account and by when you export, so don't build anything that depends on them.
- chat.html opens in any browser and lists your conversations for reading. It's handy for a quick search, but it's one large page and awkward to edit.
- conversations.json holds the same chats as structured data. This is the file to convert, archive or search with your own tools.
The JSON isn't a flat list of messages. Each conversation stores its messages as a tree, which is how ChatGPT keeps edited prompts and regenerated replies. OpenAI doesn't publish a schema for it, so here's the shape the file uses as of November 2026, trimmed to the parts that matter:
{
"title": "Trip budget",
"create_time": 1762761600.0,
"current_node": "a2",
"mapping": {
"u1": {
"message": { "author": { "role": "user" }, "content": { "parts": ["Budget for 3 days in Lisbon?"] } },
"parent": "s1",
"children": ["a1", "a2"]
},
"a2": {
"message": { "author": { "role": "assistant" }, "content": { "parts": ["Plan on about 120 USD a day."] } },
"parent": "u1",
"children": []
}
}
}
The prompt u1 has two children because the reply was regenerated once. The current_node field points to the last message of the branch you actually saw. So to rebuild the conversation as it appeared, start at current_node and follow each parent back to the root, then reverse the list.
Turn conversations.json Into One Markdown File per Chat
To split your ChatGPT export chat by chat, repeat that walk for every conversation. This short Python script does it and writes one .md file each. It uses only the standard library (json, re and pathlib), so it runs on Python 3.8 or later with nothing to install.
import json, re, sys
from pathlib import Path
src = Path(sys.argv[1])
out = Path(sys.argv[2] if len(sys.argv) > 2 else "chats")
out.mkdir(exist_ok=True)
data = json.loads(src.read_text(encoding="utf-8"))
if isinstance(data, dict):
data = [data]
for convo in data:
mapping = convo.get("mapping") or {}
node_id = convo.get("current_node")
turns = []
while node_id:
node = mapping.get(node_id) or {}
msg = node.get("message") or {}
role = (msg.get("author") or {}).get("role")
parts = (msg.get("content") or {}).get("parts") or []
text = "\n".join(p for p in parts if isinstance(p, str)).strip()
if role in ("user", "assistant") and text:
turns.append(("You" if role == "user" else "ChatGPT", text))
node_id = node.get("parent")
turns.reverse()
title = convo.get("title") or "Untitled chat"
lines = ["# " + title, ""]
for speaker, text in turns:
lines += ["## " + speaker, "", text, ""]
name = re.sub(r"[^\w\- ]", "", title).strip()[:80] or "chat"
path, n = out / (name + ".md"), 2
while path.exists():
path, n = out / f"{name} {n}.md", n + 1
path.write_text("\n".join(lines), encoding="utf-8")
print("wrote", path)
Save it as chatgpt_to_md.py next to the unzipped files and run python3 chatgpt_to_md.py conversations.json chats (on Windows, type py instead of python3). Each chat lands in the chats folder, named after its title, with a number added when two titles match. If your export holds more than one conversations JSON file, run the script once per file.
For the sample above, the output file Trip budget.md reads:
# Trip budget
## You
Budget for 3 days in Lisbon?
## ChatGPT
Plan on about 120 USD a day.
The script keeps only text from you and ChatGPT. System and tool messages are skipped, and so are images, file uploads, canvas documents and tool outputs, which don't come through as text. For other kinds of JSON, such as turning records into tables, see our guide to converting JSON to Markdown.
We prefer keeping chats as .md files. They're plain text, searchable with any tool, and easy to diff or feed back into another model. If you're moving your history into Claude, these export steps are the first half of that job, and importing is a separate step.
ChatGPT Export Not Working? Fixes When the Email Never Arrives
An export that never shows up usually comes down to timing, the wrong inbox or the wrong account. Work through these before you request again.
- Check spam and promotions folders. Search your mail for OpenAI, and check the inbox of the address on your ChatGPT account.
- Give it the full window. OpenAI's stated limit is up to 7 days, so a missing email on day two isn't a failure yet.
- Don't stack requests. Sending several in a row makes it hard to tell which link is current. We'd wait out the window before trying again.
- Sign in to the right account. Open the link while signed in to the account that asked for the export, or it may not download.
- Request again if the link expired. It lasts 24 hours after you receive it, and an expired link can't be revived.
- Ask your workspace owner. On workspace accounts such as Business or Enterprise, self-service export may not be available.
If none of that helps after the 7 days pass, contact OpenAI support through help.openai.com. Mention the date you requested the export and the account email.
Do You Need a Browser Extension to Export ChatGPT Chats?
For most people, no. Copying into a Markdown editor covers single chats, and the official export plus the script covers everything else. Neither needs a third-party add-on, which matters if you plan to export ChatGPT conversations that hold work or personal details.
Extensions and userscripts run inside your signed-in ChatGPT page, so they can read your conversations. If you install one anyway, check its permissions and who maintains it first.
Saving a chat as PDF or Word instead. Your browser's Print dialog can save a chat as a PDF, though the layout varies by browser. To get a cleaner file from pasted text, use our AI chat to PDF tool. It takes pasted text only, and each Download PDF or Word click spends 1 of the 3 free daily operations.
Our walkthrough on converting Markdown to PDF covers more options, and pasting Markdown as rich text covers Word and Google Docs.
ChatGPT Export FAQ
The right ChatGPT export depends on scope. Copy a single chat into Markdown when you need it now, and request the full data export when you want an archive. Then let the script split conversations.json into readable files. Our editor can't open the ZIP or a share link, so it works one pasted chat at a time. Drop your next conversation into the editor, check the preview and download the .md.