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

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:

  1. Visit the ChatGPT Markdown Exporter on GreasyFork
  2. Click the green "Install this script" button
  3. 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.

ChatGPT conversation example

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.

Export button location in ChatGPT

Method 2: Console Method (No Installation Required)

If you prefer not to install anything, you can export using the browser console:

  1. Open ChatGPT and navigate to your conversation
  2. Open Developer Console: Press F12 or right-click → Inspect → Console tab
  3. Paste the export code: Copy the console snippet from our documentation
  4. 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:

# 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

Ready to Export Your ChatGPT Conversations?

Get started with the free, open-source ChatGPT Exporter

Install Markdown Exporter Learn PDF Export →

📚 Related Guides