How to keep Excalidraw sketches inside Markdown notes on the Mac
Checked November 2026 against Excalidraw's repository and the Obsidian Excalidraw plugin's repository, and what Coffee does against its own code. Coffee isn't affiliated with Excalidraw or Obsidian.
A sketch often says more than the paragraph next to it: three boxes and two arrows for how a system fits together, a rough floor plan, a circle around the part of a plan that worries you. Markdown is text, so it can't hold a drawing itself. What it can do is point at one, and there are three good ways to set that up.
Three ways to keep a sketch with a note
| Way | What's in the folder | Can you edit the sketch later? | Where it shows |
|---|---|---|---|
An .excalidraw file | The drawing as JSON | Yes, in any app that reads the format | In apps that draw the format inside a note |
| An SVG or PNG export | A picture | Only if you also keep the original | Anywhere Markdown images work |
| A Mermaid block | Text inside the note | Yes, it's text | In apps and sites that render Mermaid |
Many people use two of these: the editable drawing, and a picture of it for places that can't read the drawing.
The .excalidraw file
Excalidraw is a free, open-source whiteboard with a hand-drawn look, under the MIT licence. Its repository describes an open format: a drawing saves as an .excalidraw file, which is JSON. Inside are the elements (each rectangle, arrow, line, pen stroke and piece of text, with its position, colour and the seed that gives it its wobble), the view settings, and any pictures placed on the board.
Because it's a plain file, it can live in your notes folder next to the note it belongs to:
Trip/
Trip plan.md
Trip plan.excalidraw
It syncs, backs up and moves with the rest of your notes, and you can open it again in excalidraw.com to keep drawing. What a plain Markdown editor won't do is show it: to most apps, a link to an .excalidraw file is a link to a file, not a picture.
Obsidian's Excalidraw plugin
The Excalidraw plugin for Obsidian draws boards inside the vault and embeds them in notes with the usual embed syntax, such as ![[image.excalidraw|100]] for a smaller one. Its README says drawings are now stored in Markdown files, and it calls plain .excalidraw files "legacy", with settings for keeping the two in step. So if you mix apps, check which of the two formats your drawings are in.
Export a picture: SVG or PNG
Excalidraw exports to PNG, SVG and the clipboard. A picture goes in a note the standard way, and shows in almost every editor, on GitHub, and in a static site:

SVG stays sharp at any size and is usually small. PNG is the safer choice for places that won't show SVG. Either way, keep the .excalidraw file beside it, because a picture can't be opened as a drawing again.
The Obsidian plugin can make that copy for you: its README says it can write a PNG or SVG each time a drawing is saved and keep it in sync. For more on paths and folders for pictures, see images in Markdown on the Mac.
Mermaid, when the sketch is really a diagram
If what you'd draw is boxes joined by arrows, Mermaid may suit it better. You write the diagram as text in a code block, and an app that supports it draws the picture:
flowchart LR
Idea --> Draft --> Review --> Done
The diagram lives inside the note, so search finds its words and a diff shows what changed. It won't do a floor plan, a doodle or a circle drawn around something, and the layout is chosen for you. Mermaid diagrams in Markdown covers the syntax and where it renders.
Coffee's Whiteboard
Coffee, a Mac app for Markdown notes, has a built-in whiteboard that works with .excalidraw files and draws them inside your notes. Its help page on whiteboards has a picture of one in a note.
Making a board
Choose File › New Whiteboard…, or type / in a note and choose Whiteboard. Give it a name, and Coffee saves an .excalidraw file beside the note and puts this line where the caret was:
![[Trip plan.excalidraw]]
The note shows the drawing under that line, fitted to the drawing and no wider than the text, in light or dark to match the note. Click it and the board opens in its own window. File › Open Whiteboard… opens an .excalidraw file from your notes folder or anywhere else.
Drawing
The toolbar has select, rectangle, ellipse, diamond, arrow, line, pen, text and an eraser, with the same single keys as Excalidraw: V, R, O, D, A, L, P, T and E. There are five colours, a fill, a bold line, zoom and Fit. Double-click a shape to write in it, or empty board to add text. Shift keeps squares, circles and straight angles, ⌘Z undoes and a whole drag is one step.
There's nothing to save. A change is written a moment after you make it, and the drawing in the note follows. If the file changes elsewhere while the board is open, say on another Mac, Coffee shows that version when you have nothing unsaved. If you'd changed it too, the other version stays and yours is kept beside it with "(Coffee)" in its name.
The same files as Excalidraw
Coffee writes Excalidraw's own JSON, in the order Excalidraw writes its fields, and keeps every field and element it doesn't use as it was. A board made in Coffee opens in excalidraw.com, and one made there opens in Coffee. Copy and paste works between the two too, because Coffee reads and writes Excalidraw's clipboard.
What it leaves out
Coffee's whiteboard is smaller than Excalidraw, and it's worth knowing where:
- Arrows don't attach to shapes. Move a box and its arrows stay where they were.
- You can't rotate. A shape turned in Excalidraw is drawn turned, but Coffee can't turn one.
- A picture placed on a board in Excalidraw is kept in the file but shown as a faint box.
- It reads
.excalidrawfiles, not the Markdown format the Obsidian plugin uses for new drawings. - There's no export to SVG or PNG. Open the board in excalidraw.com for that.
If you draw a lot, Excalidraw itself does more. What Coffee adds is the drawing inside the note, in a Mac editor, without a browser tab or a plugin. For boards of cards and arrows rather than sketches, Coffee also has a canvas in the JSON Canvas format.
Questions
Can Markdown hold a drawing?
Not by itself. Markdown points at a file: an image, or a drawing file such as .excalidraw in apps that show one. Mermaid is the exception, a diagram written as text inside the note.
Where should I keep .excalidraw files?
Beside the note they belong to, or in one folder for drawings. They're ordinary files, so they sync and back up with the rest of your notes.
Should I keep the .excalidraw file or a PNG?
Both, if the note will be read somewhere that can't draw the format. The .excalidraw file is the one you can edit, and the PNG or SVG is the one everything can show.
Does Coffee open drawings from excalidraw.com?
Yes. Save the drawing as an .excalidraw file, put it in your notes folder, and link it from a note with ![[Name.excalidraw]], or open it with File › Open Whiteboard….
Can Coffee export a board as SVG or PNG?
No. Open the .excalidraw file in excalidraw.com and export it there.
Coffee runs on a Mac with macOS 15 or later. It's free for 14 days without a card, then €3 a month, €29 a year, or €79 once with two years of updates.