---
agent:
  instructions: "Use this search API to find relevant content across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown."
  endpoint: "https://excalidraw.heycactus.ai/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
lang: en
---

# Export and save

Export and save take a drawing out of the browser. You can export it as a PNG or SVG image, copy it to the clipboard, or save it as an Excalidraw file that opens again later. Opening a file reads it back in, and an image opens too when it was exported with its scene embedded. Until you save it, the drawing lives in the browser's storage, which the browser can clear unexpectedly.

> Verified against the product on 2026-11-23

## Keep a copy of your drawing

Your drawing is saved in the browser's storage, which the browser can clear unexpectedly. Save your work to a file regularly so that you don't lose it.

## Export an image

Export image writes the drawing as a PNG or SVG file, or copies it to the clipboard as a PNG.

1. In the main menu, select **Export image...**.
2. Set the options below, then select **PNG**, **SVG** or **Copy to clipboard**.

| Option | What it does | Starts as |
| --- | --- | --- |
| **Only selected** | Exports only the selected shapes. The switch shows only when something is selected. | On, when something is selected. |
| **Background** | Paints the canvas background. Off leaves the image transparent. | On. |
| **Dark mode** | Exports the image in dark colors. | Off. |
| **Embed scene** | Writes the drawing into the file, so opening the file later restores the drawing. The file gets bigger. | Off. |
| **Scale** | Sets the image to 1×, 2× or 3× its size. | Your screen's pixel density when it is 1, 2 or 3, otherwise 1×. |

The image takes the drawing's name. A drawing with no name gets a default name built from the date and time. Where the browser can't pick a save location, the dialog shows a box for the name.

The file name ends in `.png` or `.svg`. With **Embed scene** on, it ends in `.excalidraw.png` or `.excalidraw.svg`.

## Copy to the clipboard

Alt+Shift+C copies the selected shapes as a PNG. When nothing is selected, it copies the whole canvas.

This needs a browser that can copy images, and at least one shape on the canvas.

The message reads "Copied selection to clipboard as PNG" or "Copied canvas to clipboard as PNG". The colour scheme follows in brackets, as **Light mode** or **Dark mode**, from the **Dark mode** option.

The command palette lists a copy-as-SVG command. It copies the drawing as SVG code, as text. It needs a browser that can copy text and at least one shape on the canvas. Its message reads "Copied canvas to clipboard as SVG" or "Copied selection to clipboard as SVG", with the colour scheme in brackets.

Copying shapes puts them on the clipboard as Excalidraw data. Pasting into Excalidraw brings them back as shapes.

## Save to a file

**Save to...** in the main menu opens the save dialog. Its **Save to disk** card holds **Save to file**, which writes the drawing as an Excalidraw file.

1. In the main menu, select **Save to...**.
2. In the **Save to disk** card, select **Save to file**.

When the save finishes, "File saved." shows for 3 seconds.

The file holds the shapes, the canvas settings a file keeps, and only the images that shapes still use.

**Save to current file** saves over the file the drawing is linked to. The link is set when you open a file or save one with **Save to file**, and the command is hidden in view mode. Its shortcut is Ctrl+S. Its message reads "Saved to" and the file's name in quotes.

Ctrl+Shift+S saves to a new file, the same as **Save to file**. **Save to file** still works in view mode.

## Open a file

1. In the main menu, select **Open**. Its shortcut is Ctrl+O.
2. If the canvas has shapes, confirm the dialog that asks before the file replaces them.
3. Choose the file. The file picker doesn't filter by file type, so any file can be picked.

**Open** is hidden in view mode. The drawing opens in place of the old one, and the file stays linked for **Save to current file**.

| File | Opens when | If it doesn't |
| --- | --- | --- |
| An Excalidraw file | Its contents are an Excalidraw drawing. | "Error: invalid file". |
| A PNG or SVG image | It was exported with **Embed scene** on, so it holds the drawing. | "Image doesn't contain scene". |
| An Excalidraw library file | Never. **Open** takes drawings only. | "Error: invalid file". |

When a file can't be opened, the editor shows the message as its error message.

## If an export or save fails

| What you see | What it means | What to do |
| --- | --- | --- |
| "Cannot export empty canvas." | The canvas has no shapes to export. | Draw something, then export again. |
| "Couldn't copy to clipboard." | The browser refused the copy. | Try again, or save a file with **Save to...** instead. |
| "Cannot show preview" with "The canvas may be too big." | The image is too big for the browser to make. | Move the farthest shapes closer together, then try again. |
| "Image doesn't contain scene" | The image was exported with **Embed scene** off, so it holds no drawing. | Open the Excalidraw file you saved, or export the image again with **Embed scene** on. |
| "Error: invalid file" | The file is not an Excalidraw drawing, or it is a library file. | Open a file saved with **Save to file**, or an image exported with **Embed scene** on. |
| No message after you close the save window | You closed the save window, and the save message is cleared. | Select **Save to file** again to save. |
| No message after a save | The save failed for another reason. | Try the save again. |

## Related pages

- [Canvas and toolbar](https://excalidraw.heycactus.ai/tqp2n6-canvas-and-toolbar) shows how to select shapes, which decides what a copy or an export takes.
- [Live collaboration](https://excalidraw.heycactus.ai/wmx9p9-live-collaboration) covers the **Shareable link** card.
- [Excalidraw web app](https://excalidraw.heycactus.ai/4y3cgx-excalidraw-web-app) explains where the drawing is kept until you save it.
- [Keyboard shortcuts](https://excalidraw.heycactus.ai/jhn9a5-keyboard-shortcuts) lists the key combinations for these commands.
