A utility to convert ChatGPT chat exports to a format compatible with t3.chat's import feature.
- Node.js
- npm/yarn
- ChatGPT account with chat history
- Clone this repository
- Install dependencies:
pnpm install
- Go to chat.openai.com
- Click on your profile picture > Settings > Data controls > Export data
- Wait for the email from OpenAI containing your data
- Download and unzip the data
- Place the conversations.json file in a
data
directory at the project root
The conversion process happens in two steps:
# Step 1: Clean and prepare conversations
pnpm run clean
# Step 2: Convert to T3 Chat format
pnpm run convert
This will generate a JSON file in the format: t3chat-import-{timestamp}.json
- Visit t3.chat
- Go to Settings > History & Sync
- Use the import feature with your generated JSON file
The converter:
- Removes empty conversations and duplicate messages from network errors
- Processes threads and messages to match T3 Chat's schema
- Validates the converted data
- Outputs a compatible JSON file
- Theo is constantly updating T3 Chat, so this script might not work for very long
- The script does not support any attachments
- The script currently ignores archived messages. If you wish to include them, comment out this line in
cleanConversations.ts
:if (conversation.is_archived === true) return null;
pnpm run clean
- Clean and prepare conversationspnpm run convert
- Convert to T3 Chat formatpnpm run typecheck
- Type check the codebase
If you'd like to convert your Claude chats to T3 Chat, check out my repo!