Markdown circuit diagram maker
Build a circuit schematic on a canvas. Place components and wires, then drop the diagram into your Markdown while keeping it fully editable.
Circuit format
A circuit is written as plain text: one component or wire per line, on a whole-number grid. The editor above reads and writes this same text, so you can type it by hand or build it on the canvas. This format is unique to this tool, so everything it understands is documented here.
The first line
Every circuit starts with the word circuit on its own line. You may follow it with an optional grid line to set how many pixels each grid cell is worth. The default is 44.
circuit
grid 44
resistor 2 1 h "1k"
Placing a component
Write the component name, its grid x and y, then h for horizontal or v for vertical. Coordinates count grid cells, so 3 1 means three cells across and one down. A component sits centred on that point and reaches half a cell to each side for its two terminals.
circuit
resistor 2 1 h
capacitor 2 3 v
inductor 5 1 h
Labels
Add a quoted label after the orientation to name a part or give it a value. The label prints beside the symbol.
circuit
battery 1 2 h "9V"
resistor 4 2 h "220"
led 7 2 h "D1"
Wires
Write wire and two grid points to join terminals. If the points share a row or column the wire is straight, otherwise it turns once (horizontal, then vertical). Chain wires end to end to route around the sheet.
circuit
source 1 3 v "5V"
resistor 4 1 h "R"
wire 1 3 1 1
wire 1 1 4 1
wire 5 1 7 1
wire 7 1 7 3
wire 7 3 1 3
Nodes and junctions
A node is a junction dot. Where a wire ends on a node's grid point the renderer draws a solid connection dot, showing that the wires there are joined rather than just crossing.
circuit
node 3 2 h
wire 1 2 3 2
wire 3 2 5 2
wire 3 2 3 4
ground 3 4 v
Comments
Anything after a # on a line is ignored, so you can annotate the source.
circuit
# power supply
battery 1 2 h "9V"
switch 4 2 h # on / off
lamp 7 2 h "L1"
Every component
Each of these is a two-terminal symbol you can place with <name> x y h|v ["label"]. ground connects from its single left/top terminal, and node is a bare junction dot.
circuit
resistor 1 1 h "resistor"
capacitor 1 3 h "capacitor"
inductor 1 5 h "inductor"
battery 1 7 h "battery"
source 1 9 h "source"
led 6 1 h "led"
diode 6 3 h "diode"
switch 6 5 h "switch"
lamp 6 7 h "lamp"
ground 6 9 h "ground"
node 9 9 h "node"
Cheat sheet
| Write this | You get |
|---|---|
circuit | Start a circuit (required first line) |
grid 44 | Set pixels per grid cell (default 44) |
<name> x y h | Place a component horizontally at grid (x, y) |
<name> x y v | Place it vertically instead |
<name> x y h "text" | Place it with a label / value |
wire x1 y1 x2 y2 | Wire two grid points (straight or one bend) |
# note | A comment, ignored to the end of the line |
resistor | Zigzag resistor |
capacitor | Two parallel plates |
inductor | Coil of humps |
battery | Alternating long / short bars |
source | Voltage source (circle with + / −) |
led | Diode with two emission arrows |
diode | Triangle and bar |
switch | Hinged lever |
lamp | Circle with a cross |
ground | Three shrinking bars |
node | A junction dot |