Skip to main content

Add text and labels

Labels on shapes and connectors make it easier to understand a diagram quickly. For some diagrams, such as entity relation or UML diagrams, these labels are essential.

Add a label

  1. Double click on a shape. Start typing to replace the label with your own text. Alternatively, single click on a shape and start typing to add or edit the label.
  2. Press Enter to save the label text.

Tip: Press Shift+Enter or Alt+Enter to add a line break in a label.

Add labels to shapes and connectors in draw.io

Add connector labels

You can add three labels to a connector - one at the source end, one at the target end, and one in the middle.

  • Double click on the connector at the position you want to add a text label.
  • To reposition the connector label text, click on the label text, then drag the small yellow diamond to a new position.

If you reroute the connector, you may need to update any labels you had manually positioned, but usually the label will move intelligently with the connector.

Add multiple labels to connectors and move them around

Edit labels

Select a shape or connector with a label or a text shape and start typing to replace the existing text with whatever you type.
Select a shape or connector and start typing to replace the label text draw.io

When you highlight some or all the text within the label, rather than just selecting the shape or connector, additional text style options will be available in the Text tab of the format panel

Select only part of the text

You can use multiple text styles within the one text shape or label or table cell.

  1. Double click on the shape or connector to highlight the text.
  2. Use the arrow keys or click within the label again to move the cursor to the start of the text you want to format.
  3. Hold down Shift and use the arrow keys or click-and-drag to select the text within the label. When you change the text style, it will only apply to the selected text.
    Use multiple different styles on text within a label in draw.io

Edit container shape labels

Tables, entity relations, lists and other complex compound shapes can contain multiple labels. Double click on any of these labels to edit them.

Double click on any label in a container shape, table or list to edit it

Add text-only shapes

Double-click on a blank area in the drawing canvas and select the text-only shape from the quick selection box. This is a simple rectangle without an outline or fill that changes size to match the text you enter.
Double click on the drawing canvas in draw.io and select Text to add a simple text-only shape

Text with a heading

Use the Textbox shape in the General shape library. This is formatted with HTML - if you find the heading disappears, edit the HTML of the textbox.
The Textbox shape in draw.io is formatted with HTML tags

List shapes and entity shapes

Use the Entity shapes from the Entity Relation shape library, or List shapes from the General shape library for neatly formatted lists.

Turn a label into a list: Select just the text you want to turn into a list within the label or text box and click on Numbered List or Bulleted List.

Make a text list in draw.io with a list shape, entity shapes or by formatting selected text

Add a table

Drag to select the size of table you need in the table tool via the toolbar. Make sure that the Container option on the table tool is not enabled - otherwise each cell will want to include shapes and not text.
Insert a table via the draw.io toolbar

Learn more about using labels