Excalidraw CLI

excalidraw render

Render a local Excalidraw file as PNG or SVG.

Render a scene locally with an installed browser. No account or API key is required.

excalidraw render [options] <file>
ArgumentDescription
<file>Excalidraw scene JSON file, or - to read stdin.
OptionDescription
--out <file>Write the image to a file (overwrites), - for stdout, or a directory with --all-frames. Required.
--format <format>Png or svg; defaults to the --out extension, else png.
--frame-id <id>Render just this frame, clipped to its bounds.
--all-framesRender each frame to its own file in the --out directory.
--padding <pixels>Padding in scene pixels; ignored for frames; default 20.
--scale <number>Resolution multiplier, up to 16; default 1.
--max-width <pixels>Maximum PNG width, up to 16384; default 16384.
--max-height <pixels>Maximum PNG height, up to 16384; default 16384.
--theme <theme>Light or dark; defaults to the scene's export preference.
--transparentExport with a transparent background.
--browser-path <path>Path to Chrome, Chromium, Edge, or Firefox; a binary named firefox is driven as Firefox. Environment variable: EXCALIDRAW_BROWSER_PATH.
--fonts-url <urls>Comma-separated mirror URLs or local folders for CJK fonts, or none. Environment variable: EXCALIDRAW_FONTS_URL.
--timeout <ms>Browser startup and render deadline; default 30000 ms.

Examples

excalidraw render drawing.excalidraw --out drawing.png
excalidraw render drawing.excalidraw --out drawing.svg
excalidraw render drawing.excalidraw --frame-id frame_123 --out frame.png
excalidraw render deck.excalidraw --all-frames --out slides/
cat drawing.excalidraw | excalidraw render - --out drawing.png
node generate-scene.js | excalidraw render - --out - > drawing.png

Notes

  • Uses an installed Chrome, Chromium, Edge or Firefox. Nothing is uploaded.
  • The format follows the --out extension, .png or .svg, unless --format is set. SVGs embed their fonts and have no size limit.
  • --all-frames writes each frame to the --out directory as its own file, numbered in presentation order, such as 01-intro.png.
  • With --out -, stdout gets only the image, without the JSON summary. Errors and retry notices go to stderr.
  • Fonts, proxies, browsers and size limits: /docs/cli/rendering

Last updated on