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

UMLet Diagrams in Markdown

How to use UMLet text-based syntax to output quick UML diagrams.

UMLet is an open-source UML tool with a simple, text-based syntax allowing you to quickly build UML diagrams without fuss.

MarkdownToPrettyPDF supports UMLet syntax via the umlet code block.

Basic Syntax

In UMLet, you define diagram elements and their layout in an XML-like structure.

syntax
<?xml version="1.0" encoding="UTF-8"?>
<diagram program="umlet" version="14.3.0">
  <zoom_level>10</zoom_level>
  <element>
    <id>UMLClass</id>
    <coordinates>
      <x>10</x>
      <y>10</y>
      <w>210</w>
      <h>190</h>
    </coordinates>
    <panel_attributes>Bank Account
--
- owner: String
- balance: Dollars
--
+ deposit(amount: Dollars)
+ withdraw(amount: Dollars)</panel_attributes>
    <additional_attributes/>
  </element>
</diagram>
UMLetUMLet diagram

UMLet favors simplicity and rapid prototyping, but normally relies heavily on its GUI counterpart. As such, the raw source can be somewhat verbose to construct entirely by hand compared to PlantUML or Mermaid.

If you already use UMLet locally, you can easily export the .uxf XML content directly into the umlet markdown block to render it perfectly on the web and inside your PDFs.