๐พ Import & Export
Open WebUI provides tools to backup your chat history and restore it later, or migrate conversations from other platforms.
Accessing Import & Exportโ
- Click on your profile name or avatar in the bottom-left corner of the sidebar.
- Select Settings from the menu.
- Navigate to the Data Controls tab.
- Use the Import Chats or Export Chats buttons.
Exporting Chatsโ
Click the Export Chats button to download all your conversations as a JSON file. This backup includes:
- All chat messages and their metadata
- Model information used in each conversation
- Timestamps and conversation structure
It's a good practice to periodically export your chats, especially before major updates or migrations.
Importing Chatsโ
Click the Import Chats button and select a JSON file to restore conversations. Open WebUI supports importing from:
- Open WebUI exports: Native JSON format from previous exports
- ChatGPT exports: Conversations exported from OpenAI's ChatGPT (auto-detected and converted)
- Custom JSON files: Any JSON file that follows the expected structure documented below
Import Behaviorโ
- Imported chats are added to your existing conversations (they don't replace them)
- Each imported chat receives a new unique ID, so re-importing the same file will create duplicates
- If using ChatGPT exports, the format is automatically detected and converted
Chat Import JSON Schemaโ
The import file must be a JSON array of chat objects. There are two accepted formats: the standard format (used by Open WebUI exports) and a legacy format.
Standard Format (Recommended)โ
Each object in the array should have a chat key containing the conversation data:
[
{
"chat": {
"title": "My Conversation",
"models": ["llama3.2"],
"history": {
"currentId": "message-id-2",
"messages": {
"message-id-1": {
"id": "message-id-1",
"parentId": null,
"childrenIds": ["message-id-2"],
"role": "user",
"content": "Hello, how are you?",
"timestamp": 1700000000
},
"message-id-2": {
"id": "message-id-2",
"parentId": "message-id-1",
"childrenIds": [],
"role": "assistant",
"content": "I'm doing well, thank you!",
"model": "llama3.2",
"done": true,
"timestamp": 1700000005
}
}
}
},
"meta": {
"tags": ["greeting"]
},
"pinned": false,
"folder_id": null,
"created_at": 1700000000,
"updated_at": 1700000005
}
]Legacy Formatโ
If the objects in the array do not have a chat key, the entire object is treated as the chat data itself (i.e. the object is wrapped in { "chat": <object> } automatically):
[
{
"title": "My Conversation",
"models": ["llama3.2"],
"history": {
"currentId": "message-id-2",
"messages": {
"message-id-1": {
"id": "message-id-1",
"parentId": null,
"childrenIds": ["message-id-2"],
"role": "user",
"content": "Hello!"
},
"message-id-2": {
"id": "message-id-2",
"parentId": "message-id-1",
"childrenIds": [],
"role": "assistant",
"content": "Hi there!",
"model": "llama3.2",
"done": true
}
}
}
}
]Field Referenceโ
Top-Level Chat Object (Standard Format)โ
| Field | Type | Required | Description |
|---|---|---|---|
chat | object | โ | The conversation data (see Chat Data below) |
meta | object | โ | Metadata such as tags (array of strings). Defaults to {} |
pinned | boolean | โ | Whether the chat is pinned. Defaults to false |
folder_id | string | null | โ | ID of the folder to place the chat in. Defaults to null |
created_at | integer | null | โ | Unix timestamp (seconds) for when the chat was created |
updated_at | integer | null | โ | Unix timestamp (seconds) for when the chat was last updated |
Chat Data Objectโ
| Field | Type | Required | Description |
|---|---|---|---|
title | string | โ | The conversation title. Defaults to "New Chat" |
models | string[] | โ | List of model identifiers used in the conversation |
history | object | โ | Contains the message tree (see History below) |
options | object | โ | Chat-level options/parameters |
History Objectโ
| Field | Type | Required | Description |
|---|---|---|---|
currentId | string | โ | ID of the last message in the active conversation branch |
messages | object | โ | A map of message ID โ message object (see Message below) |
Message Objectโ
| Field | Type | Required | Description |
|---|---|---|---|
id | string | โ | Unique identifier for the message |
parentId | string | null | โ | ID of the parent message, or null for the first message |
childrenIds | string[] | โ | Array of child message IDs. Empty array [] for the last message |
role | string | โ | Either "user" or "assistant" |
content | string | โ | The message text (supports Markdown) |
model | string | โ | Model identifier (relevant for assistant messages) |
done | boolean | โ | Whether the response is complete |
timestamp | integer |