Convert a ChatGPT export into an Open-WebUI importable JSON.
- Maps ChatGPT conversations to Open-WebUI format
- Preserves timestamps, hierarchy, and metadata
- Skips malformed conversations and tries to import each chat only once using
~/chatgpt/imported.json
git clone [email protected]:scubanarc/chatgpt-to-open-webui.git
cd chatgpt-to-open-webui
- Open ChatGPT
- Settings → Data controls → Export data → Request export
- When you receive the email, download and extract the export
- Copy the conversations.json file to
~/chatgpt/conversations.json
python convert.py
- Input:
~/chatgpt/conversations.json
- Output:
~/chatgpt/converted-for-open-webui.json
Before importing anything, back up your Open-WebUI database file:
- Stop Open-WebUI
- Make a copy of your
webui.db
(path varies by install; for Docker volumes or local data dirs)
- Open-WebUI → Settings → Chats → Import
- Select
~/chatgpt/converted-for-open-webui.json
- Start import
Notes:
- Open-WebUI currently shows no progress or feedback during import — be patient.
- Large imports can take several minutes.
- The converter saves already-imported chat IDs in
~/chatgpt/imported.json
to avoid re-importing the same chats on subsequent runs. - Still, to minimize duplicates, delete all chats from ChatGPT between export→import cycles. That way, the next export only contains new chats.
- Python 3.8+
- If the output file is empty or missing chats, confirm your ChatGPT export is complete and unmodified.
- Ensure the input path and output path exist:
~/chatgpt/
must be present and writable. - Review terminal output for skipped or malformed conversations.
Unlicense