Markdown
Export the code from a ChatGPT conversation
Keep indentation, language identifiers, and block boundaries — the three things that break when you copy code by hand.
No account, nothing stored. Files are built in your browser — revoke sensitive share links afterwards.
The converter is preset to Markdown. You can change the format at any time.
Why this format
Indentation survives intact
Leading whitespace is preserved exactly, so Python and YAML don't arrive broken.
Language identifiers are kept
Each fence keeps its language, so your editor highlights the block the moment you paste it.
Block boundaries stay clear
Explanatory prose never bleeds into a code block, which is the usual result of a manual drag-select.
One file, every snippet
Filter to assistant messages and export once instead of clicking Copy on twenty separate blocks.
Example output
```typescript
interface ConversationService {
fetchConversation(shareUrl: string): Promise<NormalizedConversation>;
}
```
```bash
curl -s "$SHARE_URL" | node scripts/normalize.mjs > thread.json
```Step by step
- 01Paste the public share link and load the conversation.
- 02Use the 'Assistant only' filter, since code almost always lives in the replies.
- 03Search the preview for a language name to find the block you want, then deselect the rest.
- 04Export as Markdown to keep fences, or JSON if a script will consume the snippets.
Tradeoffs and limits
- Inline code inside a sentence stays inline rather than becoming its own block.
- Blocks with no declared language are exported as plain fences.
- Code is exported as written in the conversation — it is not compiled, linted, or verified.
Files are generated in your browser. Nothing is stored.
Questions about this export
Related tools
- ChatGPT to MarkdownThe most faithful text format: fenced code, real tables, and links that survive a copy-paste into any editor.
- ChatGPT to JSONA stable, versioned structure meant to be read by code rather than by people.
- Copy a ChatGPT conversationSelect the whole thread — or just the turns you need — and put it on the clipboard in one action.
