Home → Export to Markdown
How to Export ChatGPT to Markdown (Free, Open-Source)
Last updated: January 2025 • 2 minute read • By Rashid Azarang
Export any ChatGPT conversation to clean Markdown format with properly preserved code blocks, formatting, and structure. This guide shows you how to use the free, open-source ChatGPT Exporter to save your chats as .md files — perfect for note-taking apps like Obsidian, documentation, or version control.
→ Learn more about ChatGPT Exporter
📋 Prerequisites
- A web browser (Chrome, Firefox, Edge, or Safari)
- Either Tampermonkey/Violentmonkey installed OR access to browser console (F12)
- An active ChatGPT account with conversations to export
Method 1: Userscript Installation (Recommended)
1Install a Userscript Manager
First, you need a userscript manager. We recommend:
Install one of these extensions from your browser's extension store.
2Install the ChatGPT Markdown Exporter
Once you have a userscript manager installed:
- Visit the ChatGPT Markdown Exporter on GreasyFork
- Click the green "Install this script" button
- Your userscript manager will open — click "Install" again
The script is now installed and will automatically run on ChatGPT.
3Open ChatGPT and Navigate to a Conversation
Go to chat.openai.com and open any conversation you want to export.
4Click the Export Button
With the userscript installed, you'll see a new "Export as Markdown" button in the ChatGPT interface.
Click it, and your conversation will automatically download as a .md file with smart naming based on your conversation title.
Method 2: Console Method (No Installation Required)
If you prefer not to install anything, you can export using the browser console:
- Open ChatGPT and navigate to your conversation
- Open Developer Console: Press F12 or right-click → Inspect → Console tab
- Paste the export code: Copy the console snippet from our documentation
- Press Enter: Your Markdown file downloads immediately
💡 Tip: The console method is perfect for one-time exports or if you can't install browser extensions.
📝 What's in Your Markdown Export?
The exported Markdown file includes:
- ✅ Complete conversation history with proper formatting
- ✅ Preserved code blocks with syntax highlighting markers
- ✅ Proper heading hierarchy and lists
- ✅ Clean, readable Markdown compatible with Obsidian, GitHub, and other apps
- ✅ Smart file naming based on conversation title
# ChatGPT Conversation Export
## User
How do I center a div in CSS?
## Assistant
Here are several ways to center a div:
### Method 1: Flexbox
```css
.parent {
display: flex;
justify-content: center;
align-items: center;
}
```
🔧 Troubleshooting
Export button doesn't appear?
Ensure your userscript manager is enabled and the script is active. Try refreshing the ChatGPT page.
Code blocks not formatting correctly?
The exporter preserves code blocks with proper markdown syntax. If your markdown viewer doesn't display them correctly, check its settings.
Images showing as placeholders?
ChatGPT images are referenced as links. The exporter includes image placeholders that link to the original sources.
Very long conversations timing out?
For extremely long conversations (100+ messages), the export might take a few seconds. The browser may show as unresponsive briefly — this is normal.
💡 Popular Use Cases for Markdown Exports
- Obsidian & Note-Taking: Import conversations directly into your knowledge base
- Documentation: Convert AI-assisted code explanations into project docs
- GitHub: Share conversations as markdown files in repositories
- Blog Posts: Transform helpful ChatGPT responses into content
- Study Notes: Organize learning conversations by topic
📚 Related Guides