Free tool

Import D2 into Eraser

Drop a D2 Studio export or any .d2 file and get Eraser diagrams you can drag straight onto a canvas. Every board, every layer.

Runs entirely in your browser. Nothing is uploaded.

Drop your D2 project here

A D2 Studio export (.zip), a single file, or a whole folder. Imports between files are resolved, and each board becomes its own diagram.

.zip.d2folder

How it works

Three steps from D2 Studio to an Eraser canvas

Step 1

Export from D2 Studio

Open your project and choose Export. You get a zip with your .d2 files and a small manifest. Drop that zip above.

Step 2

Convert in your browser

The real D2 compiler runs locally, with TALA. Imports, variables, classes and layers are resolved, then each board becomes an Eraser diagram.

Step 3

Drag onto any canvas

Download the .eraserdiagram files and drop them on an Eraser canvas. They land as editable diagrams, not images.

Need a hand with your projects?

Eraser and the D2 Studio team are working together on the transition. If something didn’t convert the way you expected, or you have a lot of projects to bring over, book a call and we’ll walk through it with you.

FAQs

  • Is my diagram uploaded anywhere?

    No. The D2 compiler runs as WebAssembly inside your browser tab. The page makes no network request with your files, and you can convert with the network turned off.

  • What is a .eraserdiagram file?

    Eraser’s native diagram file, the same one the GitHub integration reads and writes. Drop it on any canvas and it opens as an editable diagram.

  • Will the layout match D2 Studio?

    For almost every board, yes. Boards are laid out with TALA, the same engine D2 Studio used. TALA slows down sharply on very large boards, so if it takes more than 90 seconds on one, that board is laid out with ELK instead and the result says so. The exceptions are sequence diagrams and boards made entirely of tables: those become a real Eraser sequence diagram or ERD, which set their own positions.

  • Do my colours come across?

    Yes, including the ones you never set. D2 gives its own theme colours to anything you left alone, and those come across too, so a board you never styled still looks the way D2 drew it. Text colour is left to Eraser so it keeps working in dark mode.

  • What happens to my icons?

    Icon URLs are never fetched. Every icon in the D2 catalogue is mapped to an Eraser icon ahead of time: its counterpart where Eraser has one, otherwise the nearest thing (an RDS instance lands on the RDS icon). Icons hosted anywhere else become a placeholder you can change in one click.

  • Do layers, scenarios and steps come through?

    Yes. The entry board and every layer, scenario and step under it becomes a separate diagram, named after the board.

  • Which D2 features aren’t supported?

    Grid containers convert to plain shapes and connections, and markdown and LaTeX come across as text rather than typeset. Notes inside a sequence diagram, relationship labels on an ERD, animated edges and 3D or multiple styles are dropped. Everything else in the D2 language, including imports, variables, globs and classes, is resolved by the real compiler, and each board lists what was translated.

  • I have dozens of projects. Is there a command line?

    Yes. The same converter runs from the terminal so you can convert a folder of exports in one go.