DEV Community

Hexloom Labs
Hexloom Labs

Posted on Originally published at hexloomlabs.com

Back up your ChatGPT, Claude and Gemini history as Markdown for Obsidian

Disclosure: this article was written with AI assistance (Claude, by Anthropic) for Hexloom Labs, which makes the extension mentioned at the end.

If you keep notes in Obsidian, you have probably wanted your ChatGPT, Claude and Gemini conversations in the same vault as everything else, as plain Markdown files you can search and link. Here are the routes that exist today, and where each one stops.

Route 1: the built-in data exports

Each service has some form of account export.

  • ChatGPT: Settings, Data controls, Export data. You get an email with a download link to a zip. Inside is conversations.json (every chat in one file) and a chat.html page.
  • Claude and Gemini: both let you request an export of your account data too (Claude from its privacy settings, Google through Takeout for Gemini). Check each service's current settings page, since these menus move.

The limits: you wait for an email, the result is one large file rather than one note per chat, and you still have to turn JSON into Markdown yourself.

Route 2: copy and paste

Select the conversation, copy, paste into a new note. It works for one chat. Code blocks often lose their fences, roles ("You said", "ChatGPT said") end up as plain text, and you add a title and date by hand every time.

Route 3: split the JSON with a script

If you are comfortable with a few lines of Python, you can read the ChatGPT conversations.json and write one file per conversation. The format is a tree of message nodes rather than a flat list, so you need to walk it from the current node back to the root to get the messages in order. It is a good afternoon project, and it only covers the one service whose export you scripted.

Route 4: a browser extension that reads the open chat

An extension can read the conversation already rendered in your tab and save it as a file. The things worth checking before you install one:

  1. Where does the chat go? Prefer one that makes no network requests. Look at its listed permissions.
  2. What is in the file? You want a title, a date, roles, and code blocks kept intact. YAML frontmatter at the top lets Obsidian treat the file as a note with properties.
  3. What happens when the site changes? These tools read the page layout, so a redesign can break them until they are updated.

What we built

We make one of these: Hexloom Chat Archive. It saves the open chat on chatgpt.com, claude.ai or gemini.google.com as Markdown or JSON with Obsidian-friendly frontmatter, locally in the browser, with no analytics and no server of ours involved.

The free version exports the chat you have open. Pro ($4 a month or $29 a year) adds bulk archiving of your history for ChatGPT and Gemini, saving into a folder you pick, and local search.

Honest limits, from the product page: it has been tested against recorded copies of the pages rather than logged-in sessions, so it may report "No messages found" on a given site until a fix ships. Images are linked, not embedded, and attachments are not supported. Bulk archiving opens your chats automatically in your own session, which some services' terms restrict, so it is off on claude.ai and is used at your own risk elsewhere. It needs Chrome or Edge 137 or later, and it is available on Microsoft Edge now, with the Chrome Web Store version in review.

Details and the full limits list: Hexloom Chat Archive.

Top comments (1)

Collapse
 
officialmailkr profile image
오피셜메일 •

브라우저 확장 방식은 페이지 구조가 바뀌면 추출이 깨질 수 있고 첨부파일은 포함되지 않는다는 한계를 명시한 점이 좋습니다. 백업 후 대화 몇 건을 골라 역할 구분, 코드 블록, 링크가 복원되는지 확인하는 절차도 있으면 실사용에 도움이 되겠습니다.