How to export a ChatGPT conversation to Markdown

18 October 2026 · 5 min read

Quick answer

ChatGPT has no button that saves a single conversation as Markdown. You can copy each reply by hand, request the full data export from Settings, or add a small tool to the page that downloads the open conversation as a .md file in one click.

Why you'd want a conversation as Markdown

A good ChatGPT conversation is often worth keeping: a debugging session, a research thread, a draft you went back and forth on. Markdown is the format most note apps, wikis and code editors read natively. Obsidian, Notion, GitHub, VS Code and most static site tools all open it, and it keeps headings, lists, tables and code blocks intact. The trouble is that ChatGPT shows the conversation as a web page, and the obvious ways of getting it out either lose the formatting or give you far more than one conversation.

The built-in way

ChatGPT can export all of your data at once. As of October 2026, the steps are:

  1. Open ChatGPT and click your profile picture, then Settings.
  2. Go to Data controls.
  3. Next to Export data, click Export, then confirm.

OpenAI then emails you a download link. The archive is a ZIP file containing an HTML page with every conversation you have, plus JSON files with the same data in machine-readable form. The link in the email expires after a day, so download it soon after it arrives.

This is the right tool for a backup of your whole history. It's the wrong tool for one conversation. You get every chat you've ever had, in HTML and JSON rather than Markdown, and you wait for an email each time. Turning the JSON into clean Markdown is a small programming project of its own. Some business and enterprise workspaces don't offer the export at all.

The manual way

For a single conversation, copying by hand works:

  1. Hover over each of ChatGPT's replies and click the copy button under it. The copied text comes out as Markdown, with code blocks and lists preserved.
  2. Paste each reply into a new file in your editor.
  3. Copy your own messages by selecting them and pasting them in between, adding a heading such as ## You and ## ChatGPT before each part.
  4. Save the file with a .md extension.

This gives you a clean file, but it takes a minute per exchange. A long conversation with forty messages becomes a tedious job, and it's easy to skip a message or paste two replies in the wrong order. Selecting the whole page with Ctrl+A and pasting is faster, but it drags in the sidebar, button labels and timestamps, and it flattens code blocks into plain text.

Make it permanent with a tool

If you save conversations more than once in a while, the copying is a job a small tool can do. A userscript is a few lines of JavaScript that runs on a site you choose. One that adds an Export to Markdown button to ChatGPT would read the open conversation from the page, walk through each message in order, label it as yours or ChatGPT's, convert the formatting to Markdown and download the result as a .md file named after the conversation.

You don't have to write that script yourself. ScriptPanda is a Chrome extension that builds tools like this from a plain-English description. You open its side panel on chatgpt.com, describe the button you want, and it writes the userscript and installs it on the page. The request at the end of this guide is the exact one to paste. The button then sits on every ChatGPT conversation you open.

A few details are worth asking for in the same request, or in a follow-up change:

  • The file name. Ask for the conversation title in the name, so files sort sensibly in a folder.
  • Front matter. If you use Obsidian, ask for a short YAML header with the date and the conversation link.
  • Only part of the chat. You can ask for a checkbox on each message, and export only the ticked ones.

Once it's built, this kind of tool runs in your browser as often as you like. It doesn't call AI to export, so exporting doesn't use any of your plan's requests. Only building it and changing it later do.

Which option to pick

  • One conversation, once: copy the replies by hand.
  • Everything you've ever written, as a backup: use Export data in Settings.
  • One conversation, regularly, with the formatting kept: add the export button.

Limits

The tool works on the conversation that's open in the tab. It can't export conversations you haven't opened, and it can't run in the background or on a schedule. It reads what ChatGPT has rendered on the page, so images you uploaded and files ChatGPT generated come out as links or placeholders, not as the files themselves. If ChatGPT changes its page layout, the button can stop finding messages. When that happens, open ScriptPanda on the page, say what broke, and ask it to fix the tool for the page as it is now. Your exported files are saved to your computer like any other download. Nothing is sent anywhere when you click the button.

Do it with ScriptPanda

Build it in one request

Add an Export to Markdown button at the top of this ChatGPT conversation. When I click it, download the whole conversation as a .md file, with my messages and ChatGPT's replies as separate sections, keeping code blocks, lists and tables.

  1. 1Add ScriptPanda to Chrome.
  2. 2Open the side panel on the site you want to change.
  3. 3Paste the request and send it. ScriptPanda builds the tool into the page.
Add ScriptPanda to Chrome

Related guides