> For the complete documentation index, see [llms.txt](https://easy-draw.joemazzone.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://easy-draw.joemazzone.net/java/module-reference/saving-your-drawing.md).

# Saving Your Drawing

## Your Drawing is Already Saved

Every time your program runs, Easy Draw writes your drawing to an `index.html` file in the folder you run your program from. Open `index.html` in a web browser any time to see your drawing again.

## Using the Button

You can save your drawing as a PNG file by clicking the **Save Canvas** button in the Easy Draw page. Just be sure to provide the image with a file name. Your web browser downloads the picture, so it will be in your Downloads folder.

## `EasyDraw.saveCanvas()`

To save the canvas from your code, use `EasyDraw.saveCanvas()`. The picture saves as a .png file in the folder you run your program from.

```java
EasyDraw.saveCanvas("my_pic");
```

Without a file name, it asks for the file's name in the terminal:

```java
EasyDraw.saveCanvas();
```

{% hint style="info" %}
The picture is created by your web browser, so your drawing must be open in a browser tab. If it is not open yet, Easy Draw waits and saves the picture once the page opens.
{% endhint %}
