Label connectors
Connectors can have multiple labels - as many as you need.
Add and edit connector labels
Add a label: Double click on the connector at the location where you want to add a label. Alternatively, drag a Text shape from the Shapes panel and drop it onto a connector to add it as a label at that position.

Edit a label: Double click on the text to edit the label.
Move a connector label
These labels will move with the connector as you move the shapes around on the drawing canvas, but you can also drag them to another location.
To manually change a label's position, select the label by clicking on it, then drag the diamond grab handle to a new position.

Reset connector label positions
Move labels that you have dragged away back onto their connector.
- Select the connector, or select only the label you want to reset.
- Select Reset in the Arrange tab of the format panel, then select Label Positions from the list.
The label of the connector will move back to the middle of the connector. Additional labels will move back onto the connector line, at the same position along the connector.
Rotate a connector label
Select the label on a connector, and use the rotate grab handle to rotate the text.
Tip: In some shapes, you can change the writing direction of the labels from horizontal to vertical.
Copy and paste a connector label
Font styles, font size, and label background settings will be copied along with the text.
- Select a label on a connector.
- Copy it with
Ctrl+Con Windows,Cmd+Con macOS. - Move the mouse cursor over the connector where you want the new label.
- Paste it with
Ctrl+Von Windows,Cmd+Von macOS.
The label will be pasted at the mouse cursor position on the selected connector. If you have moved the cursor away from that connector, it is pasted with a small offset from the original label position.
Format and style the text
Use the Text tab in the format panel to change the style of a connector label.
You can add line breaks in connector labels, use a different font or font size or an external font, and add HTML formatting including superscript and subscript.
Labels follow the connector's text style: The labels that you add with a double click on a connector, and the labels of the connectors in the Shapes panel, use the text style of the connector: the font, font size, font colour, bold and italic, background, border and Label Padding. Select the connector and change its text style in the Text tab. Its labels will change too.
Give a label its own style: Select the label and change its style in the Text tab. The settings that you change no longer follow the connector. This also happens when you select the connector together with its labels and change their style, so select only the connector to change the style of all its labels.
Learn more about styling text and labels in draw.io
Change the label background
Transparent: By default, new connector labels have a transparent background. The label has no background colour. Instead, the connector line stops at the edges of the label, but gradients, images, shapes and other connectors behind the label stay visible.
Solid: Show a solid background colour behind a label instead.
- Select the label, or select the connector to change it for the labels that follow the connector.
- Open the Text tab in the format panel.
- Select Solid from the Background list.
The label will hide the line and any shapes behind it with the selected colour, also in dark mode.
None: If you want the connector to remain visible through the connector line, select None from the Background list.
Use Label Padding in the Text tab to make the solid background or the transparent gap wider.
Diagrams that you insert from Mermaid or PlantUML retain their label backgrounds so they look the same as in Mermaid or PlantUML.
Reset the text style of a connector label
Reset the text style to use the connector's text style again for labels that have overridden that style.
- Select one or more labels of a connector.
- Click Use Connector Style at the bottom of the Text tab.

The labels will use the text style of the connector, and will follow it when you change it.
Note: Use Connector Style is only shown when a selected label has its own text style defined, overriding the connector's text style. A tooltip on this button lists the styles that it resets.
Place connector labels automatically
Auto Label Placement moves connector labels clear of the line, avoiding nearby shapes and other labels.
- On a horizontal segment, the label sits just above the line, so the line stays whole. If a shape, a label or another connector is in the way above, the label is placed below the line or onto the line if both sides are taken.
- On a vertical or diagonal segment, the label stays on the line and cuts a gap out of it.
- The label avoids bends and arrowheads. A label in the middle of its connector that doesn't fit its segment moves to the nearest segment that does.
- Select one or more connectors, or only the labels you want to place.
- Expand the Effects section in the Style tab of the format panel.
- Select the Auto Label Placement checkbox.

The labels will be relocated whenever the connector changes, for example, when you move a connected shape or a waypoint.
Note: A label that you have dragged to a new position stays there. It only moves above the line on a horizontal segment and onto the line on all others. Labels with vertical text are not placed automatically.