> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chartdb.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Export Diagram as JSON

> Learn how to export your ChartDB diagram as a JSON file for safekeeping and future modifications.

<Frame>
  <img src="https://mintcdn.com/buckledev/Nk8pE0k5UNFAdU1u/docs/images/export-diagram.png?fit=max&auto=format&n=Nk8pE0k5UNFAdU1u&q=85&s=9ce17d88a4ba7ff7c623f0d7dbaef3ff" width="2880" height="1800" data-path="docs/images/export-diagram.png" />
</Frame>

Exporting your current diagram a JSON file is useful for creating backups of your work or saving a specific state.
You can later re-import and continue editing.

<Note>
  The Export Diagram (JSON) feature requires an upgraded subscription on ChartDB Cloud. See our [Cloud vs Self-Hosted](/docs/cloud-vs-self-hosted) documentation for more details.
</Note>

<Steps>
  <Step title="Access Export Diagram">
    Navigate to the **Share** menu located in the top navigation bar. From the
    dropdown menu, select **Export Diagram**.
  </Step>

  <Step title="Initiate JSON Export">
    In the "Export Diagram" interface, you will see the option to export as
    JSON. Click the **Export** button.
  </Step>

  <Step title="Save JSON File">
    Your browser will prompt you to save a `.json` file. This file contains your
    diagram's data in JSON format.
  </Step>
</Steps>

<Warning>
  The JSON file exported using this feature is **specifically designed for
  re-importing diagrams back into ChartDB**. This JSON format is **different**
  from the JSON structure used when initially importing a database schema into
  ChartDB via SQL scripts. Do not attempt to use exported diagram JSON files for
  database schema import via SQL script methods.
</Warning>

## Next Steps

Now that you have successfully exported your diagram as a JSON file, save it in a secure and accessible location on your local machine. When you are ready to resume working on your diagram or wish to make further edits, you can easily import this JSON file back into ChartDB.

<CardGroup cols={1}>
  <Card title="Import Diagram as JSON" href="/docs/import/json" icon="file-import">
    Learn how to import your exported JSON diagram back into ChartDB to continue
    editing and visualizing your database.
  </Card>
</CardGroup>
