ChatGPT Conversation Export
A standalone userscript for exporting ChatGPT conversations as clean Markdown, HTML, or plain text.
It is designed for normal ChatGPT chats and Deep Research threads. The exported files are meant to be readable by humans and useful for agents, knowledge bases, note-taking systems, and local study workflows.
Features
- Adds an
Export button to the ChatGPT header.
- Exports conversations to:
- Markdown (
.md)
- HTML (
.html)
- Plain text (
.txt)
- Preserves headings, paragraphs, lists, code blocks, links, images, and tables.
- Renders Markdown tables as real HTML tables in the HTML export.
- Removes ChatGPT interface noise such as copy/share buttons and hidden screen-reader labels.
- Removes raw internal ChatGPT citation markers such as
turn9search18 artifacts.
- Detects embedded Deep Research frames.
- Supports Deep Research with a manual paste fallback when browser sandboxing prevents automatic reading.
- Does not use external libraries or remote code.
Deep Research Support
Deep Research often lives inside sandboxed cross-origin iframes. A browser extension can inject code into those frames more reliably, but a GreasyFork/Tampermonkey userscript cannot always do that.
This script handles Deep Research in two ways:
- It first tries to capture readable Deep Research content automatically.
- If the iframe is detected but cannot be read, it opens a small non-blocking panel called
Paste Deep Research content.
The fallback flow is:
- Start an export from the
Export button.
- If the paste panel appears, leave it open.
- Click
Copy contents inside the Deep Research panel in ChatGPT.
- Paste the copied report into the userscript panel.
- Click
Continue export.
The paste panel is intentionally non-modal, so it does not block the page and you can still interact with ChatGPT behind it.
Clean Output
The export is cleaned before saving:
- ChatGPT action buttons are removed.
- Sandboxed iframe placeholders are removed.
- Raw internal citation markers are stripped.
- Markdown spacing is normalized.
- Deep Research pasted content is cleaned with the same pipeline as normal chat content.
This makes the output suitable for:
- Obsidian or other Markdown notebooks
- Local archives
- OpenClaw or other agent memory systems
- Research notes
- HTML reading copies
- Plain text ingestion
Installation
Install a userscript manager such as Tampermonkey, Violentmonkey, or Greasemonkey, then install the .user.js file.
The script runs on:
Usage
- Open a ChatGPT conversation.
- Click
Export in the conversation header.
- Choose
Markdown, HTML, or Text.
- If Deep Research is blocked by iframe sandboxing, paste the copied Deep Research content into the panel and continue.
Privacy
The script runs locally in your browser.
It does not send conversation content to any server. Exported files are created locally through the browser download flow.
Limitations
- Deep Research automatic capture is best-effort because userscripts cannot reliably access every sandboxed iframe.
- If automatic capture fails, use the built-in paste fallback.
- The script follows ChatGPT's current DOM structure; future ChatGPT UI changes may require updates.