open-context open-context
August 8, 2026 · 7 min read

How to Migrate ChatGPT History to Claude (Free & Local)

You can migrate your full ChatGPT conversation history to Claude in three steps: export your ChatGPT data as a ZIP file, run it through open-context — a free, open source, local-only converter — and paste the generated preferences and memory documents into Claude's settings. The whole process runs on your own machine and takes about five minutes for a typical export.

Key takeaways

  • ChatGPT lets you export your full conversation history as a ZIP from Settings → Data Controls → Export data.
  • open-context converts that export into Claude-ready preferences.md, memory.md, and per-conversation markdown files.
  • Everything runs locally — no external API calls except to your own optional Ollama instance.
  • You can skip AI analysis entirely with --skip-preferences for an instant, no-model conversion.
  • The same tool also installs as an MCP server, giving Claude persistent memory across every future conversation.

Why switching AI assistants usually means losing everything

Every AI assistant remembers you differently, and none of them talk to each other. If you've spent months teaching ChatGPT your coding style, your project context, and your communication preferences, none of that comes with you when you try Claude — you start from a blank slate. That's the specific problem open-context solves: it reads your existing chat export, figures out who you are and how you like to communicate, and writes that out in a format Claude can actually use.

What open-context actually does

The conversion pipeline has three stages:

  1. Parse — reads conversations.json from your ChatGPT export and walks the message tree to reconstruct every conversation in order.
  2. Normalize — converts ChatGPT's format into a common schema (role, content, timestamp, attachments) shared across supported providers.
  3. Generate — writes per-conversation markdown files, a searchable index, and — if you opt in — AI-generated preferences.md and memory.md via a local Ollama model.

Step-by-step: export ChatGPT, import to Claude

1. Export your ChatGPT data

In ChatGPT, go to your profile → Settings → Data Controls → Export data. OpenAI emails you a download link, usually within a few hours. Download the ZIP file — you won't need to unzip it yourself.

2. Run open-context

The fastest path is the official Docker image, which bundles the web UI, REST API, and MCP server:

docker run -p 3000:3000 \
  -v opencontext-data:/root/.opencontext \
  adityakarnam/open-context:latest

Open http://localhost:3000, upload your export ZIP, and review your imported conversations before exporting. Prefer the terminal? The CLI does the same conversion in one command:

npm install
npm start -- convert path/to/chatgpt-export.zip

Add --skip-preferences to skip AI analysis entirely and get a plain markdown conversion in seconds, or leave it on (with Ollama running) for AI-written preferences and memory summaries.

3. Paste into Claude

Two files matter most for the actual migration:

FileWhere it goes
preferences.mdClaude Settings → Preferences
memory.mdClaude → Manage Memory

Copy each file's contents into the corresponding field and save. Claude now knows your communication style, technical background, and current focus — the same context you'd have built up in ChatGPT over months, transferred in minutes.

What gets generated

claude-export/
├── preferences.md       # paste into Claude Settings → Preferences
├── memory.md            # paste into Claude → Manage Memory
├── user-profile.md      # your ChatGPT account info
├── index.md             # searchable conversation list
└── conversations/       # one markdown file per conversation

The conversations/ folder is useful beyond the initial migration too — upload the relevant files into a Claude Project as project knowledge, so specific past conversations stay searchable and citable going forward.

Beyond one-time migration: persistent memory via MCP

A one-time import solves the past; it doesn't solve the future. open-context also ships an MCP server that gives Claude Code and Claude Desktop persistent memory across every new conversation — save_context, recall_context, and search_contexts tools backed by a local JSON store at ~/.opencontext/contexts.json. Once connected, Claude can save a note mid-conversation and pull it back up weeks later without you re-explaining anything.

Privacy: why it all runs locally

Your chat history is some of the most personal data you generate. open-context never uploads it anywhere — the CLI, web UI, and MCP server all run on your own machine or your own Docker host. The only outbound network call the tool can make is to an Ollama instance you control, and only if you enable AI-powered preference analysis. Skip that flag, and the entire pipeline never touches the network at all.

Migrate your own ChatGPT history in about five minutes.

Get started with open-context →

FAQ

Is open-context affiliated with Anthropic or OpenAI?

No. open-context is an independent, community-built, open source tool. It is not affiliated with, endorsed by, or built by Anthropic or OpenAI.

Do I need Ollama to migrate my ChatGPT history?

No. Ollama is optional and only used to generate richer AI-written preferences and memory summaries. Running with --skip-preferences produces a full markdown conversion of your conversations in seconds without any local model.

Does migrating with open-context change or delete my ChatGPT data?

No. open-context only reads the ZIP file you already exported from ChatGPT. It never connects to your ChatGPT account, and your original export and account data are left untouched.

Is my conversation data ever sent to an external server?

No. open-context runs entirely on your own machine. The only network call it can make is to your own Ollama instance, if you choose to enable AI analysis, and that stays on your local network or self-hosted infrastructure.

Can I migrate from Google Gemini to Claude too?

Gemini export support is on the open-context roadmap. Today, ChatGPT export is fully supported via the CLI, web UI, and Docker image.