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

BPMN Diagrams in Markdown

How to embed Business Process Model and Notation diagrams.

BPMN (Business Process Model and Notation) is a graphical representation for specifying business processes in a business process model.

MarkdownToPrettyPDF allows you to render BPMN files directly using the bpmn block via Kroki.

Basic Syntax

BPMN is an XML-based format. You will typically generate this XML using a tool like the Camunda Modeler, and then paste it directly into your bpmn fenced code block.

syntax
<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_1xzgfzj" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.6.0">
  <bpmn:process id="Process_1lyj7s0" isExecutable="true">
    <bpmn:startEvent id="StartEvent_1">
      <bpmn:outgoing>Flow_1hx11f8</bpmn:outgoing>
    </bpmn:startEvent>
    <bpmn:task id="Activity_0lndsv2" name="Do Task A">
      <bpmn:incoming>Flow_1hx11f8</bpmn:incoming>
      <bpmn:outgoing>Flow_12g2g9y</bpmn:outgoing>
    </bpmn:task>
    <bpmn:sequenceFlow id="Flow_1hx11f8" sourceRef="StartEvent_1" targetRef="Activity_0lndsv2" />
    <bpmn:endEvent id="Event_0f34p1z">
      <bpmn:incoming>Flow_12g2g9y</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:sequenceFlow id="Flow_12g2g9y" sourceRef="Activity_0lndsv2" targetRef="Event_0f34p1z" />
  </bpmn:process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1lyj7s0">
      <bpmndi:BPMNEdge id="Flow_1hx11f8_di" bpmnElement="Flow_1hx11f8">
        <di:waypoint x="215" y="117" />
        <di:waypoint x="270" y="117" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_12g2g9y_di" bpmnElement="Flow_12g2g9y">
        <di:waypoint x="370" y="117" />
        <di:waypoint x="432" y="117" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
        <dc:Bounds x="179" y="99" width="36" height="36" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_0lndsv2_di" bpmnElement="Activity_0lndsv2">
        <dc:Bounds x="270" y="77" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_0f34p1z_di" bpmnElement="Event_0f34p1z">
        <dc:Bounds x="432" y="99" width="36" height="36" />
      </bpmndi:BPMNShape>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>
BPMNBPMN diagram

BPMN diagrams are essential for enterprise workflows and clearly documenting standard operating procedures. By pinning them directly in your Markdown documentation, they stay visible alongside system architecture and guides.