DEV Community

Cover image for Long ChatGPT chats kept breaking my copy-paste. So I built an exporter.
surajdev9
surajdev9

Posted on

Long ChatGPT chats kept breaking my copy-paste. So I built an exporter.

A free Chrome extension I built to save full ChatGPT conversations as Markdown in one click — because the existing ways were genuinely painful.

tags: chrome, productivity, opensource, chatgpt

If you've ever had one of those long ChatGPT conversations — the kind where you spent half a day going deep into system design, or debugging something tricky, or learning a new concept end to end — you've probably run into this moment:

You finish. You realize the chat is gold. You want to save it.

You hit Ctrl + A.

Your browser freezes for ten seconds.

You finally manage to copy. You paste it into a doc. Half the formatting is gone. Code blocks are mangled. The structure that made the conversation useful is just… not there anymore.

That's where this story starts.


The problem (and why it's worse than it sounds)

I learn a lot from ChatGPT. Not in a passive "ask one question, move on" way — I have multi-day conversations going on system design, RabbitMQ internals, architecture decisions, debugging sessions. Some of my chats have 800+ messages.

These conversations are genuinely valuable. They're notes I keep coming back to. They're the work.

But getting them out of ChatGPT is shockingly bad:

  • Copy-paste: freezes the browser on long chats, mangles formatting
  • Screenshot: useless if you ever need to search or re-read it
  • ChatGPT's own export feature: emails you a giant ZIP… sometimes days later… of everything you've ever written. No per-chat option.
  • Manual cleanup: spending an hour formatting one conversation into Markdown is not what I want to be doing at 11 PM

I checked if a tool already existed. Some did — most were either broken on long chats, badly designed, full of trackers, or only saved the messages currently visible on screen (which is a fraction of a long conversation, because ChatGPT only keeps the visible messages loaded in memory).

So I built my own.


What it actually does

ChatGPT Exporter is a Chrome extension that does one thing:

Save your entire ChatGPT conversation as a clean Markdown file in one click.

That's it. No account, no signup, no upload, no cloud. You click a button, your file downloads.


It has three modes depending on the situation:

1. Export Full Chat — the main one. Works on chats of any length, including ones with thousands of messages. One click, full conversation, done.

2. Export Visible — when you only want to save the part you're looking at right now.

3. Scroll Capture — a fallback that captures messages as you scroll through the chat. Useful if the first mode ever hiccups.

The output is clean Markdown with proper headings, code blocks (with the right language), bold, italics, links, lists — everything that made the conversation structured stays structured.


Who it's for

It started as a tool for me, but it turns out a lot of people have this problem:

  • Code learners taking notes from long debugging or learning sessions
  • Writers and researchers preserving drafts and idea threads
  • Developers archiving architectural discussions they want to reference later
  • Anyone who realized too late that an important conversation got buried in their chat history

If you've ever thought "I should save that conversation somewhere I can actually find it" and then didn't, because the friction was too high — this is for you.


Try it

🔗 Chrome Web Store:
https://chromewebstore.google.com/detail/pmkhjmgnkohjdgninjfkdcegfkmnkfca

📦 Source code: https://github.com/SurajKhonde/chatgpt-exporter

It's open source under MIT. Free forever. No ads, no tracking, no account.


What I learned building it

A few things I picked up that might be useful to anyone building browser extensions:

  • Manifest V3 is much stricter than V2. Permissions get audited automatically — request only what you actually use, or your submission gets rejected. (Ask me how I know.)
  • DOM virtualization is a real problem. ChatGPT only mounts the messages currently near the viewport, so naively scraping the page misses 90% of a long conversation. Solving this properly took more iteration than I expected.
  • Stable IDs matter. Every message in ChatGPT has a unique ID — using that as the dedup key (instead of position) is the difference between a working exporter and a broken one.
  • Shipping a Chrome extension is a process. Icons, screenshots, promo tiles, privacy practices, justifications for every permission… expect to spend almost as much time on the store listing as the code.

What's next

A few things I'd like to add:

  • PDF export (Markdown → PDF in one click)
  • JSON export (raw conversation tree, for people who want to do their own processing)
  • Batch export — saving multiple conversations at once

If you have ideas, PRs welcome on GitHub.


One last thing

If you've also been losing important conversations in your ChatGPT history, give this a try. And if it saves you time, drop a ⭐ on the repo or share this with someone who needs it.

Built out of a real problem I face daily. Hope it helps you too.

— Suraj

Top comments (0)