← Back to Guides
DiagramsWireViz Diagrams in Markdown

Try this in the editor

Paste the examples from this guide into the live editor and export them to a styled PDF or HTML file — diagrams, math and syntax highlighting included. Free, no signup.

Published on 2026-02-22

WireViz Diagrams in Markdown

How to document wiring harnesses, cable assemblies, and connector pinouts in Markdown using WireViz YAML — then export the result to a print-ready PDF.

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.

Related guides