Add line breaks in labels

You can add line breaks to shape and connector labels.

Press Shift+Enter as you type the label text to add a line break.

Add line breaks to shape and connector labels in draw.io

Open this example in our online editor

Line breaks are only possible when you use HTML labels, and with word wrapping enabled on shapes. Both are enabled by default.

Re-enable HTML labels and word wrap

If you find a shape or a connector doesn’t allow you to add a line break, edit the shape style to re-enable these two options.

  1. Select the shape, then click Edit Style in the Style tab of the format panel.
  2. Add the style options: whiteSpace=wrap and html=1, as shown in the image below.
    Enable word wrapping and HTML labels in the style options to add line breaks to shapes if they had been deactivated