xxxxxxxxxx
 
1
[<start>start] -> [<state>plunder] -> [<choice>more loot] -> [start]
2
[more loot] no ->[<end>e]
3
​
4
[Pirate|
5
  [beard]--[parrot]
6
  [beard]-:>[foul mouth]
7
]
8
​
9
[<table>mischief| bawl | sing || yell | drink ]
10
​
11
[<abstract>Marauder]<:--[Pirate]
12
[Pirate] - 0..7[mischief]
13
[<actor id=sailor>Jolly;Sailor]
14
[sailor]->[Pirate]
15
[sailor]->[rum]
16
[Pirate]-> *[rum|tastiness: Int|swig()]
17
​

Association types

association -
association ->
association <->
dependency -->
dependency <-->
generalization -:>
implementation --:>
composition +-
composition +->
aggregation o-
aggregation o->
ball and socket -o)
ball and socket o<-)
ball and socket ->o
note --
hidden -/-

Class diagram types

[class]
[class] class
[<abstract> abstract]
[<abstract> abstract] abstract
[<instance> instance]
[<instance> instance] instance
[<reference> reference]
[<reference> reference] reference
[<package> package|components]
[<package> package|components] package components
[<frame> frame|]
[<frame> frame|] frame

Component diagram types

[Component] - [<socket> socket]
[Component] - [<socket> socket] Component socket
[<lollipop> lollipop] - [Component]
[<lollipop> lollipop] - [Component] lollipop Component

Flow chart types

[<start> start]
[<start> start]
[<end> end]
[<end> end]
[<state> state]
[<state> state] state
[<choice> choice]
[<choice> choice] choice
[<sync> sync]
[<sync> sync]
[<input> input]
[<input> input] input
[<sender> sender]
[<sender> sender] sender
[<receiver> receiver]
[<receiver> receiver] receiver
[<transceiver> transceiver]
[<transceiver> transceiver] transceiver

Use case types

[<actor> actor]
[<actor> actor] actor
[<usecase> usecase]
[<usecase> usecase] usecase

Miscalleneous types

[<note> note]
[<note> note] note
[<label> label]
[<label> label] label
[<hidden> hidden]
[<hidden> hidden]
[<database> database]
[<database> database] database
[<pipe> pipe]
[<pipe> pipe] pipe
[<table> table| a | 5 || b | 7]
[<table> table| a | 5 || b | 7] table a 5 b 7

Comments

Comments are supported at the start of a line
//[commented]
[not //commented]
//[commented] [not //commented] not //commented

Id attribute

Two distinct nodes can have the same display name with the id attribute.
[<actor id=a>User]
[<actor id=b>User]
[a] -- [b]
[<actor id=a>User] [<actor id=b>User] [a] -- [b] User User

Directives

#import: filename
#arrowSize: 1
#bendSize: 0.3
#direction: down | right
#gutter: 5
#edgeMargin: 0
#gravity: 1
#edges: hard | rounded
#background: transparent
#fill: #eee8d5; #fdf6e3
#fillArrows: false
#font: Calibri
#fontSize: 12
#leading: 1.35
#lineWidth: 3
#padding: 8
#spacing: 40
#stroke: #33322E
#title: filename
#zoom: 1
#acyclicer: greedy
#ranker: network-simplex | tight-tree | longest-path

Custom classifier styles

A directive that starts with "." define a classifier style. The style is written as a space separated list of modifiers and key/value pairs.

#.box: fill=#8f8 dashed
#.blob: visual=ellipse title=bold
[<box> GreenBox]
[<blob> Blobby]
#.box: fill=#8f8 dashed #.blob: visual=ellipse title=bold [<box> GreenBox] [<blob> Blobby] GreenBox Blobby

Modifiers

dashed

Key/value pairs

fill=(any css color)

stroke=(any css color)

align=center
align=left

direction=right
direction=down

visual=actor
visual=class
visual=database
visual=ellipse
visual=end
visual=frame
visual=hidden
visual=input
visual=none
visual=note
visual=package
visual=pipe
visual=receiver
visual=rhomb
visual=roundrect
visual=sender
visual=start
visual=sync
visual=table
visual=transceiver

Style title and text body

title=left,italic,bold
body=center,italic,bold

Text modifiers

bold
center
italic
left
underline

Welcome to nomnoml

A tool for drawing UML diagrams based on a simple syntax.

Try and edit the code on the left and watch the diagram change. Any changes are saved to the browser's localStorage, so your diagram should be here the next time, (but no guarantees).

Created by Daniel Kallin and hosted on GitHub for your perusal.

Interaction

The canvas can be panned and zoomed by dragging and scrolling in the right hand third of the canvas.

interaction tutorial

The editor supports a subset of Sublime Text's keymappings.

Usage

Car has an Engine

[Car]->[Engine]
[Car]->[Engine] Car Engine

Car owns an arbitrary number of blemished

[Car] +-> 0..* [RustPatch]
[Car] +-> 0..* [RustPatch] 0..* Car RustPatch

Car knows its Manufacturer and is the parent of Pickup

[Car]o->[Manufacturer]
[Car]<:-[Pickup]
[Car]o->[Manufacturer] [Car]<:-[Pickup] Car Manufacturer Pickup

Car has some attributes

[Car|speed: Number;valves: Valve\[\] ]
[Car|speed: Number;valves: Valve\[\] ] Car speed: Number valves: Valve[]

Engine has an operation

[Engine||start()]
[Engine||start()] Engine start()

Engine has internal parts

[Engine|
  [Cylinder]->1[Piston]
  [Cylinder]->2[Valve]
]
[Engine| [Cylinder]->1[Piston] [Cylinder]->2[Valve] ] Engine 1 2 Cylinder Piston Valve

Engine depends on components

[Engine] - [<socket>Tank]
[Tank] -->o [Big Fuel Tank]
				
[Engine] - [<socket>Tank] [Tank] -->o [Big Fuel Tank] Engine Tank Big Fuel Tank

Set font

#font: Times
Text with serifs
				
#font: Times Text with serifs Text with serifs

Layout the diagram really tight

#fontSize: 8
#spacing: 12
#padding: 3
[Lorem ipsum]-[dolor sit amet]
#fontSize: 8 #spacing: 12 #padding: 3 [Lorem ipsum]-[dolor sit amet] Lorem ipsum dolor sit amet

Tables

[<table>Fruits|
  Apples  | 17   ||
  Oranges | 4711
]
[<table>Fruits| Apples | 17 || Oranges | 4711 ] Fruits Apples 17 Oranges 4711

Create your own styles

#.box: fill=#8f8 dashed
[<box> GreenBox]
#.box: fill=#8f8 dashed [<box> GreenBox] GreenBox

Divide into multiple files

#.blob: fill=pink
#import: blobby_styles
[<blob> Blobby]
#.blob: fill=pink [<blob> Blobby] Blobby

Share diagram

Shareable linkServer hosted SVG

Downloads

PNG image

Downloaded image files will be given the filename in the #title directive

SVG with source

Downloaded SVG files will have the source code embedded. Open an exported SVG file to load it's nomnoml source.

Source code
Export .zip archive...Save to local file...

Local files

Home

 

Import files with #import: file

Create folders with / in filename

nomnoml