Skip to main content


You almost never have to think about style decisions like indentation, newlines, number of hyphens, or spacing. D2's auto-formatter will format your D2 file for you on compile, keeping all your declarations consistent and readable, effortlessly.

The auto-formatter runs on every compilation.

If your file is

When you compile, it becomes