Skip to content

rashidazarang/chatgpt-chat-exporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChatGPT Chat Exporter

Version: v0.5.0

Export your full ChatGPT conversations as clean, readable Markdown or PDF files — including all messages, sender labels, and code blocks.

🎯 Major Update: Added Google Gemini support! Now exports conversations from both ChatGPT and Gemini with the same high-quality accuracy.

ChatGPT Chat Exporter in action


✅ Features

  • 🆕 NEW: Google Gemini conversation export support
  • 📝 Captures all messages with proper sender attribution
  • 🔧 Preserves code blocks, formatting, and structure
  • 📄 Supports export as Markdown or Printable PDF
  • 🚀 Works directly from browser — no install required
  • 🛡️ Future-proof against interface changes

📦 How to Use

ChatGPT Conversations

Method 1: Console Method

  1. Open a conversation in ChatGPT
  2. Open DevTools → Console (F12)
  3. Choose your export format:
  4. Hit Enter — file will download with conversation title in filename

Method 2: Install as Userscript (Recommended)

This is the safest and most convenient method:

  1. Install a userscript manager extension in your browser:

  2. Click one of these links to install the userscript:

    Directly from GitHub:

    From GreasyFork (Recommended):

  3. Open ChatGPT and click the "Export as Markdown" or "Export as PDF" button that appears in the sidebar.

Google Gemini Conversations

Console Method

  1. Open your conversation at gemini.google.com
  2. Open DevTools → Console (F12)
  3. Paste contents of gemini-exporter-markdown.js
  4. Hit Enter — .md file downloads automatically

🖼️ Demo

Markdown Output PDF View

🔧 What's New in v0.5.0

Major Improvements:

  • 🎯 Smart File Naming: Exported files now use conversation titles instead of generic names
  • 📄 True PDF Support: PDF exporter creates print-optimized HTML that converts perfectly to PDF
  • 🔍 Better Message Detection: Improved selectors to prevent duplicate messages
  • 🛡️ CSP Compliant: All exporters work within ChatGPT's security restrictions

📝 Previous Updates (v0.4.0)

New Features:

  • 🆕 Google Gemini Support: Full conversation export for Gemini
  • 🔧 Unified Codebase: Shared logic and improvements across platforms

Enhanced Features (Both Platforms):

  • ✅ Modern selector cascade with platform-specific optimizations
  • ✅ Platform-specific sender detection and content processing
  • ✅ Intelligent duplicate prevention across both platforms
  • ✅ Conversation title extraction for better file naming
  • ✅ Console logging for transparency and debugging

🚀 Version History

  • v0.5.0 (Current) - Smart file naming, true PDF support, improved duplicate detection
  • v0.4.0 - Added Google Gemini support, multi-platform architecture
  • v0.3.0 - Major ChatGPT stability fixes, modern selectors, duplicate prevention
  • v0.2.0 (Archived) - Original ChatGPT working version

📜 License

MIT

About

A lightweight browser-based tool to export your ChatGPT conversations in beautiful Markdown or PDF format.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •