ScriptsApr 3, 2026·2 min read

Excalidraw — Collaborative Whiteboard & Diagrams

Draw hand-sketched diagrams with real-time collaboration. Embeddable React component. The most popular whiteboard tool. 120K+ stars.

TL;DR
Excalidraw creates hand-drawn diagrams with real-time collaboration online.
§01

What it is

Excalidraw is an open-source virtual whiteboard for creating hand-drawn-style diagrams. It supports real-time collaboration, end-to-end encryption, and works directly in the browser without an account. The React component can be embedded in any application. Diagrams export to PNG, SVG, or the native .excalidraw format.

It targets developers, designers, and teams who need a quick, frictionless way to sketch system architectures, flowcharts, wireframes, and technical diagrams.

§02

How it saves time or tokens

Excalidraw removes friction from visual communication. Instead of firing up a heavy diagramming tool, you open excalidraw.com and start drawing. For AI workflows, you can use Excalidraw to sketch agent architectures, data flow diagrams, and system designs. The embeddable React component lets you add drawing capabilities to your own applications without building a canvas from scratch.

§03

How to use

  1. Use instantly at excalidraw.com -- no account needed.
  1. Embed in your React app:
npm install @excalidraw/excalidraw
  1. Add the component:
import { Excalidraw } from '@excalidraw/excalidraw';

export default function Whiteboard() {
    return (
        <div style={{ height: '600px' }}>
            <Excalidraw
                onChange={(elements, state) => {
                    console.log('Elements:', elements);
                }}
            />
        </div>
    );
}
§04

Example

import { Excalidraw, exportToBlob } from '@excalidraw/excalidraw';
import { useState, useRef } from 'react';

export default function DiagramEditor() {
    const [excalidrawAPI, setExcalidrawAPI] = useState(null);
    
    const exportDiagram = async () => {
        const elements = excalidrawAPI.getSceneElements();
        const blob = await exportToBlob({
            elements,
            mimeType: 'image/png',
            appState: { exportWithDarkMode: false }
        });
        // Upload blob to your server or display it
        const url = URL.createObjectURL(blob);
        window.open(url);
    };
    
    return (
        <div>
            <button onClick={exportDiagram}>Export PNG</button>
            <div style={{ height: '500px' }}>
                <Excalidraw ref={(api) => setExcalidrawAPI(api)} />
            </div>
        </div>
    );
}
§05

Related on TokRepo

§06

Common pitfalls

  • The React component requires careful container sizing. Set an explicit height on the parent div, or the canvas will collapse to zero height.
  • Real-time collaboration uses Excalidraw's servers by default. For self-hosted collaboration, you need to set up your own WebSocket server.
  • Complex diagrams with hundreds of elements can become slow on low-powered devices. Keep diagrams focused and split large architectures into multiple boards.

Frequently Asked Questions

Is Excalidraw free?+

Yes. Excalidraw is open-source under the MIT license. The web app at excalidraw.com is free with no account required. Excalidraw+ is a paid version with features like saved libraries and team workspaces, but the core tool is completely free.

Does Excalidraw support real-time collaboration?+

Yes. Share a link and multiple people can draw on the same canvas simultaneously. Collaboration is end-to-end encrypted, meaning the server cannot read your diagram content. This works without accounts or sign-ups.

Can I embed Excalidraw in my app?+

Yes. The @excalidraw/excalidraw npm package provides a React component you can embed in any React application. You can load and save diagrams programmatically, customize the toolbar, and export to PNG, SVG, or JSON.

What export formats does Excalidraw support?+

Excalidraw exports to PNG, SVG, the native .excalidraw JSON format, and clipboard. PNG and SVG support transparent backgrounds and dark mode. The JSON format preserves all element data for lossless round-tripping.

Can AI generate Excalidraw diagrams?+

Yes. The .excalidraw format is JSON with a well-defined schema. AI models can generate valid Excalidraw JSON to create diagrams programmatically. Several community tools use LLMs to convert text descriptions into Excalidraw diagrams.

Citations (3)
🙏

Source & Thanks

Created by Excalidraw. Licensed under MIT.

excalidraw — ⭐ 120,000+

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets