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.

On this page

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

What it does

Exports only the selected shapes. The switch shows only when something is selected.

Starts as

On, when something is selected.

Background

What it does

Paints the canvas background. Off leaves the image transparent.

Starts as

On.

Dark mode

What it does

Exports the image in dark colors.

Starts as

Off.

Embed scene

What it does

Writes the drawing into the file, so opening the file later restores the drawing. The file gets bigger.

Starts as

Off.

Scale

What it does

Sets the image to 1×, 2× or 3× its size.

Starts as

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

Opens when

Its contents are an Excalidraw drawing.

If it doesn't

"Error: invalid file".

A PNG or SVG image

Opens when

It was exported with Embed scene on, so it holds the drawing.

If it doesn't

"Image doesn't contain scene".

An Excalidraw library file

Opens when

Never. Open takes drawings only.

If it doesn't

"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."

What it means

The canvas has no shapes to export.

What to do

Draw something, then export again.

"Couldn't copy to clipboard."

What it means

The browser refused the copy.

What to do

Try again, or save a file with Save to... instead.

"Cannot show preview" with "The canvas may be too big."

What it means

The image is too big for the browser to make.

What to do

Move the farthest shapes closer together, then try again.

"Image doesn't contain scene"

What it means

The image was exported with Embed scene off, so it holds no drawing.

What to do

Open the Excalidraw file you saved, or export the image again with Embed scene on.

"Error: invalid file"

What it means

The file is not an Excalidraw drawing, or it is a library file.

What to do

Open a file saved with Save to file, or an image exported with Embed scene on.

No message after you close the save window

What it means

You closed the save window, and the save message is cleared.

What to do

Select Save to file again to save.

No message after a save

What it means

The save failed for another reason.

What to do

Try the save again.

Sources

Related pages