← Back to Guides
DiagramsWireViz Diagrams in Markdown
Published on 2026-02-22

WireViz Diagrams in Markdown

How to document wiring harnesses and pinout diagrams.

WireViz is a tool for easily documenting cables, wiring harnesses and connector pinouts. It is natively supported in MarkdownToPrettyPDF through Kroki using the wireviz language fence.

Basic Syntax

WireViz understands YAML syntax. You define connectors, cables, and how they wire together.

syntax
connectors:
  X1:
    type: D-Sub
    subtype: female
    pinlabels: [DCD, RX, TX, DTR, GND, DSR, RTS, CTS, RI]
  X2:
    type: Molex
    subtype: male
    pinlabels: [GND, RX, TX]

cables:
  W1:
    gauge: 0.25 mm2
    length: 0.2
    color_code: DIN
    wirecount: 3

connections:
  -
    - X1: [5, 2, 3]
    - W1: [1, 2, 3]
    - X2: [1, 3, 2]
WireVizWireViz diagram

Advanced Attributes

You can style specific cables, specify colors, and attach visual notes or attributes to components.

syntax
connectors:
  MCU:
    type: PCB
    pinlabels: [GND, 5V, TX, RX]
  Sensor:
    type: Header
    pinlabels: [GND, VCC, SDA, SCL]

cables:
  C1:
    colors: [BK, RD, BU, YE]

connections:
  -
    - MCU: [GND, 5V, TX, RX]
    - C1:  [1, 2, 3, 4]
    - Sensor: [GND, VCC, SDA, SCL]
WireVizWireViz diagram

WireViz allows hardware engineers to cleanly document and version-control interconnects instead of relying on fragile and unreadable CAD drawings.