> ## 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 DBML

> Export your diagram as a DBML script in ChartDB

[YouTube video player](https://www.youtube.com/embed/uzvQw5NYaBs?autoplay=1\&color=white)

> [!NOTE]
>
> The Export DBML feature requires an upgraded subscription on ChartDB Cloud. See our [Cloud vs Self-Hosted](https://docs.chartdb.io/docs/cloud-vs-self-hosted.md) documentation for more details.

**1. Locate Tables List**

In the editor's side panel, locate the top of the tables list on the left

**2. Open DBML View**

Click the **arrows button ("\<>")**

![](https://mintcdn.com/buckledev/Nk8pE0k5UNFAdU1u/docs/images/export-dbml-editor.png?fit=max\&auto=format\&n=Nk8pE0k5UNFAdU1u\&q=85\&s=1168a3ab1f72c84a62085dac1bd1d714)

**3. Copy DBML Script**

The **DBML** script representing your diagram will be displayed. You can copy it for use elsewhere.

![](https://mintcdn.com/buckledev/Nk8pE0k5UNFAdU1u/docs/images/copy-dbml.png?fit=max\&auto=format\&n=Nk8pE0k5UNFAdU1u\&q=85\&s=f5063401aaad13653d6821648fda0e93)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.