> Updated for version 6.0.30

Want to back up the variables of a project, or reuse them in another one? The **Export** window packs them into a JSON file, with the type and value of each, and you can then import that file into any project.

![Export window, Data tab: Variables section with the variable counter and the Export (JSON) and Import (JSON) buttons](https://chatwoot.fr.nocodespacelab.com/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBdFVKIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--7a729c47b0561ab1d7ff114de51e98923b9517ec/project-exporter--exporter-donnees.en.png)
*the Export window open on the Data tab, Variables section, with the variable counter and the two buttons Export (JSON) and Import (JSON)*

## What it is for

- Backing up the values of your variables before a big change;
- copying a set of variables from one project to another (an inventory, scores, settings) without recreating them by hand;
- sharing your variables with a colleague.

## Where to find it

1. Open the main menu, then click **Export** (shortcut **Cmd + Shift + S** on Mac, **Ctrl + Shift + S** on Windows and Linux);
2. choose the **Data** tab;
3. find the **Variables** section.

The section shows how many variables the project has and, if there are any, how many are lists and objects. If the project has no variable, a message invites you to create some in the **Variables** window of the main menu, or to import a file.

## Exporting variables

1. Click **Export (JSON)**;
2. your browser downloads a file named after your project, for example `My project - variables.json` (or `variables.json` if the project has no name).

The button is greyed out while the project has no variable.

### What the file contains

- the variables you see in the variable browser, with their name, type and value;
- for a list, the values it holds.

The files themselves are not inside the JSON: an Image variable, for instance, only keeps the link to its file.

## Importing variables

1. Open the same section in the destination project;
2. click **Import (JSON)** and choose a `.json` file made by the export;
3. a message (for example **3 variables imported**) lists the names that were added.

Imported variables are added to the ones the project already has. Existing variables are never changed. The import is a single step in the project history: a single undo removes it entirely.

> 💡 **Tip:** export from the original project right before importing, so the file is up to date.

### If a name already exists

The import is all or nothing. If at least one variable in the file has the same name as a variable in the project, nothing is imported and the **These variables already exist** message lists the names. Rename or delete those variables in the project, or in the original project before exporting, then try again.

### If a file is missing

When a variable points to a file the destination project does not have, the variable is imported but a warning appears: the file is not in this project. Add it in **Files**, then pick it in the variable.

## Limits

- Only the variables of the variable browser are exported, not graphs or modules (for modules, see [Import and export a module](https://documentation.celestory.io/hc/celestorydoc/articles/fr-decouvrir-celestory-importer-et-exporter-un-module-b7738d));
- a file edited by hand may be refused: do not edit the JSON;
- the file must come from the variables export, not from another tool;
- files (images, sounds...) do not travel with the JSON.

## Troubleshooting

When the import fails, a red-edged box explains the cause and the fix, and offers **Copy for support** (see [Understanding an error message](https://documentation.celestory.io/hc/celestorydoc/articles/1795347834-understanding-an-error-message)). Nothing is added to the project in these cases.

| Message | What to do |
|---|---|
| Unreadable file | This is not a readable JSON file: choose a file made by the export. |
| This file is an archive | This is a modules export (.zip): import it on the **Modules** tab of the same window, in the **Import modules** section. |
| This file holds no Celestory variables | This JSON does not come from the variables export. |
| No variables in this file | Export from a project that has variables first. |
| Invalid variable | A variable has a name, type or value that is not recognized: export again without editing the file. |
| Two variables have the same name | Rename one of them in the original project, export again, then import again. |
| These variables already exist | Rename or delete the duplicate variables, then import again. |

> 🔺 **Note:** some error messages mention “Import/Export variables”. They mean the **Export (JSON)** and **Import (JSON)** buttons on the **Data** tab.

## See also

- [Choosing a variable type](https://documentation.celestory.io/hc/celestorydoc/articles/1795347775-choosing-a-variable-type)
- [Understanding an error message](https://documentation.celestory.io/hc/celestorydoc/articles/1795347834-understanding-an-error-message)
- [Import and export a module](https://documentation.celestory.io/hc/celestorydoc/articles/fr-decouvrir-celestory-importer-et-exporter-un-module-b7738d)
