Skip to main content

Import & Export

Open WebUI provides tools to backup your chat history and restore it later, or migrate conversations from other platforms.

Accessing Import & Export​

  1. Click on your profile name or avatar in the bottom-left corner of the sidebar.
  2. Select Settings from the menu.
  3. Navigate to the Data Controls tab.
  4. 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
Images and attached files are not in the export

In a saved chat, images and other files you attach are uploaded to the server as files. The chat, and so the export, keeps only each file's ID and name, and Open WebUI loads the image from /api/v1/files/<id>/content when it shows the message. Import the chat on another Open WebUI instance and those images do not load and those files cannot be opened, because that instance has no file with that ID. Keep the original files if you need them after a migration.

A temporary chat is the exception. Images stay inside the chat as base64 data and other files as their extracted text, so Download > Export chat (.json) in the chat menu of a temporary chat carries them.

Regular Backups

It's a good practice to periodically export your chats, especially before major updates or migrations.

To save one conversation as a PDF, open the chat's three-dot menu at the top of the chat or beside an editable chat in the sidebar. Choose Download > PDF document (.pdf). Allow Chat Export is on by default. If an administrator removes this permission, the Download menu is hidden for affected users. Admins retain access.

Settings > Interface > Stylized PDF Export is on by default. It captures the rendered conversation as page images. If the stylized PDF is blank or too large, or you need selectable text, turn this setting off and export the PDF again. The text-based PDF contains the active branch's message text without the rendered layout or inline images.

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 permission also covers forking

Allow Chat Import gates forking a chat as well, which copies an existing conversation into a new one. Where it is not granted, the Import Chats row here, the Fork chat action under an assistant response and the /fork entry in the chat input's / menu are all left out of the interface rather than shown and refused. Admins are always exempt. See Permissions.

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
  • Tags your account does not have yet are created from the file. An export stores each tag in lowercase with underscores, so a tag named Import Test comes back as import_test

Moving chats between instances​

Chat JSON exports, including Export from a folder menu, contain conversation records. Importing them does not create folders or restore folder settings such as system prompts. Open WebUI keeps an exported folder ID only if that exact folder exists on the destination and you can write to it. Otherwise, the chat is imported outside any folder. Recreate the folders and their settings on the destination, then move the imported chats into them.

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.

Each object in the array should have a chat key containing the conversation data:

[
  {
    "chat": {
      "title": "My Conversation",
      "models": ["qwen3.6:27b"],
      "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": "qwen3.6:27b",
            "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": ["qwen3.6:27b"],
    "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": "qwen3.6:27b",
          "done": true
        }
      }
    }
  }
]

Field Reference​

Top-Level Chat Object (Standard Format)​

FieldTypeRequiredDescription
chatobjectYesThe conversation data (see Chat Data below)
metaobjectNoMetadata such as tags (array of strings). Defaults to {}
pinnedbooleanNoWhether the chat is pinned. Defaults to false
archivedbooleanNoWhether the chat is archived. Defaults to false. An archived chat is imported into Settings > Archived Chats
variablesobjectNoValues filled in for the chat's chat variables. Defaults to {}
folder_idstring | nullNoID of the folder to place the chat in. Defaults to null. It has to name a folder you can write to, either one you own or one shared with you with Write access. A folder that does not exist, or one shared with you for reading only, is cleared and the chat is imported outside any folder rather than failing the import
created_atinteger | nullNoUnix timestamp (seconds) for when the chat was created
updated_atinteger | nullNoUnix timestamp (seconds) for when the chat was last updated

Chat Data Object​

FieldTypeRequiredDescription
titlestringNoThe conversation title. Defaults to "New Chat"
modelsstring[]NoList of model identifiers used in the conversation
historyobjectYesContains the message tree (see History below)
optionsobjectNoChat-level options/parameters

History Object​

FieldTypeRequiredDescription
currentIdstringYesID of the last message in the active conversation branch
messagesobjectYesA map of message ID → message object (see Message below)

Message Object​

FieldTypeRequiredDescription
idstringYesUnique identifier for the message
parentIdstring | nullYesID of the parent message, or null for the first message
childrenIdsstring[]YesArray of child message IDs. Empty array [] for the last message
rolestringYesEither "user" or "assistant"
contentstringYesThe message text (supports Markdown)
modelstringNoModel identifier (relevant for assistant messages)
donebooleanNoWhether the response is complete
timestampintegerNoUnix timestamp (seconds) for the message
contextstring | nullNoAdditional context for the message
Message Tree Structure

Messages use a tree structure rather than a flat list. Each message references its parent via parentId and its children via childrenIds. This allows Open WebUI to support branching conversations (e.g. editing a message and getting a different response). The history.currentId field points to the last message in the currently active branch.

ChatGPT Export Format​

ChatGPT exports are automatically detected when any object in the array contains a mapping key; entries without one (ChatGPT's folder and project records) are skipped. You don't need to manually convert ChatGPT exports: just import the file directly and Open WebUI will handle the conversion.

Minimal Working Example​

The smallest valid import file looks like this:

[
  {
    "title": "Quick Chat",
    "history": {
      "currentId": "msg-1",
      "messages": {
        "msg-1": {
          "id": "msg-1",
          "parentId": null,
          "childrenIds": [],
          "role": "user",
          "content": "Hello!"
        }
      }
    }
  }
]

This uses the legacy format (no chat wrapper) with a single user message.

FAQ​

Q: Will importing chats overwrite my existing conversations?
A: No. Imported chats are added alongside your existing conversations.

Q: Can I import chats from Claude, Gemini, or other platforms?
A: There is no built-in converter for these platforms. You would need to transform your export into the JSON structure documented above. The key requirement is building the message tree with correct parentId / childrenIds relationships.

Q: Is there a size limit for imports?
A: There's no hard-coded limit, but very large files may take longer to process. The practical limit depends on your server configuration and available memory.

Q: What happens if I import the same file twice?
A: Each import creates new chats with fresh IDs, so you will end up with duplicate conversations.

Q: What message roles are supported?
A: The import supports "user" and "assistant" roles. System messages are typically set via model configurations rather than stored in the chat history.

This content is for informational purposes only and does not constitute a warranty, guarantee, or contractual commitment. Open WebUI is provided "as is." See your license for applicable terms.