How to Insert a Straight Line in Word: 3 Easy Methods

How-to basics · Updated November 21, 2026

To insert a straight line in Word, use the Insert tab’s Shapes tool and hold Shift while you drag to keep the line level or at a precise angle. For a quick divider, type three hyphens and press Enter, or add a horizontal line from the paragraph borders menu. These methods work in desktop Word for Microsoft 365 on Windows; the best choice depends on whether you need a movable line or a simple separator.

What You’ll Need

  • Microsoft Word for Microsoft 365 on a Windows PC for the ribbon paths below. The desktop versions of Word for Mac have equivalent shape and paragraph tools, though some menu labels and shortcuts differ.
  • A document where you can click or create the location for the line. Save your document first if you are making changes to an important file.
  • For a shape line, a mouse or trackpad is helpful for drawing and positioning it. You can refine its placement and appearance after you insert it.

Step-by-Step

Choose one of these three methods. Use a shape when you want precise placement, the keyboard method for a fast divider, or a paragraph border when the line should follow the width of the text area.

  1. Insert a line shape you can position.
    1. Click in the document near the place where the line should go. If you want it between two paragraphs, put the insertion point on an empty line or click in the paragraph where it should sit.
    2. Select Insert > Shapes. In the Lines section of the menu, choose Line, usually shown as a simple diagonal stroke.
    3. Move the pointer to the starting point, then click and drag to the ending point. Hold Shift while dragging to constrain the line to a horizontal, vertical, or 45-degree angle. For a level divider, keep Shift pressed for the full drag.
    4. Release the mouse button, then release Shift. The line is selected, so you can drag an endpoint to adjust its length or position. Click outside it when you are done.
    5. To change its appearance, select the line and open the Shape Format tab. Choose Shape Outline to change its color, weight, or dash style. If the tab is not visible, click the line again.

    A shape is a drawing object, not a character in the text. It can be moved and formatted independently, and its position may be tied to a paragraph. If it appears in the wrong place after you edit nearby text, select it and adjust its layout or placement. To remove it, click its edge and press Delete.

  2. Make a quick horizontal rule with the keyboard.
    1. Click at the start of a blank paragraph where you want the divider. The automatic rule is created from a paragraph mark, so it generally stretches across the available text width rather than stopping at a chosen point.
    2. Type three hyphens in a row: ---. Do not add spaces between them.
    3. Press Enter. If Word’s AutoFormat feature is enabled, it converts the characters into a horizontal line or paragraph border.
    4. To continue typing below it, press Enter once more after the rule, or click in the paragraph below. If the line appears in place of text you wanted to keep, immediately press Ctrl+Z on Windows to undo the conversion.

    This is the fastest choice for a plain separator, but it is less flexible than a shape. It follows the paragraph and page margins, and you cannot drag its endpoints to set a custom length. Word’s automatic formatting settings can also be disabled, in which case the three hyphens remain as typed.

  3. Insert a horizontal line from the paragraph borders menu.
    1. Click in the paragraph where the line should appear. For a divider between sections, click in an empty paragraph between the sections.
    2. On the Home tab, find the Paragraph group and open the arrow beside the Borders button. The button’s icon may look like a small grid or square.
    3. Choose Horizontal Line from the menu. Word inserts a line across the paragraph area. If you do not see that command, use the three-hyphen method or insert a line shape instead.
    4. Click the inserted line to select it. Depending on your Word version, you may be able to open a formatting dialog by right-clicking it and choosing Format Horizontal Line. Use the available controls to adjust its width, height, color, or alignment.
    5. Click elsewhere to finish. If the line is too close to surrounding text, add a blank paragraph above or below it, or adjust paragraph spacing rather than repeatedly pressing Enter.

    A horizontal line added this way behaves more like a document divider than a freely drawn object. It is useful when you want a clean rule aligned with the text area, but it may not offer the same placement control as a shape.

Word for Mac: The general steps are similar: choose Insert > Shapes, select a line, and drag to draw it. Hold Shift while drawing to constrain its angle. On many Mac keyboards, use Command+Z to undo rather than Ctrl+Z. The Borders menu and available horizontal-line formatting options can differ slightly by release. If a ribbon command is missing, use Word’s search box or open the desktop version if you are working in Word for the web.

Common Mistakes

  • Drawing without holding Shift. A line that looks nearly horizontal may be slightly slanted. Hold Shift during the entire drag; do not press it only after drawing.
  • Choosing a border when you need a movable line. The automatic rule and paragraph horizontal line follow text layout. If you need a divider that begins or ends at a specific point, use a shape instead.
  • Clicking in the wrong paragraph. Borders and automatic rules are associated with paragraphs. A rule may appear above or below an unexpected block if the insertion point was in the wrong place. Undo, click the intended paragraph, and repeat.
  • Typing hyphens and expecting them to convert when AutoFormat is off. If three hyphens stay on screen after Enter, that does not necessarily mean Word is broken. Use a shape, or enable the automatic border option if you want this shortcut to work.
  • Pressing Enter repeatedly to create spacing. Extra paragraph marks can make a divider shift when text changes. Use paragraph spacing controls or one intentional blank paragraph instead.
  • Deleting text instead of selecting the line. For a shape, click its edge until handles appear, then press Delete. For a paragraph rule, place the cursor in the associated paragraph and use the Borders menu to remove or change the border.

Tips

  • Make a shorter divider: Insert a shape and drag its endpoints to the desired length. A paragraph rule generally spans the text area, so it is not the best option for a short decorative stroke.
  • Keep the line aligned: Use Shift while drawing, then zoom in if you need to check its placement. You can also use the Shape Format controls to refine the line’s color and thickness.
  • Use a consistent style: For repeated section dividers, copy an existing formatted shape and reposition the copy, or use the same paragraph-border approach throughout the document.
  • Check how it moves with text: A shape may be anchored to a paragraph. If moving nearby text also moves the shape, select the line and review its layout options. For a simple divider that should remain part of the text flow, a paragraph rule is often easier to maintain.
  • Save as you go: A line is a small edit, but many shapes can complicate layout. Save after formatting important pages, especially before changing anchors or wrapping settings.

Troubleshooting

The line is not perfectly straight. Delete or undo the uneven line, choose Insert > Shapes > Line again, and hold Shift from the moment you begin dragging until you release the mouse. For an existing shape, adjust one endpoint while holding Shift.

Three hyphens do not turn into a line. First check that you typed three consecutive hyphens in a blank paragraph and pressed Enter. If they remain, open File > Options > Proofing > AutoCorrect Options on Windows, then check the AutoFormat As You Type tab for the border-line option. The exact label can vary between Word releases. Alternatively, use the Shapes method, which does not depend on AutoFormat.

The line is hard to select. Click close to the stroke rather than in the surrounding text. If a shape is behind text or difficult to reach, use Home > Select > Selection Pane to locate drawing objects and select the line from the list. Once selected, handles should appear at its ends.

The line moves or overlaps text unexpectedly. This usually involves text wrapping or the shape’s anchor. Select the shape, open its layout options, and choose a wrapping arrangement that suits the page. For a simple divider within a text section, replace it with a paragraph rule so it stays with the text more naturally.

You cannot find the Horizontal Line command. Confirm that you opened the arrow next to Borders in the Home tab’s Paragraph group, not the page-border controls. If the command is not offered in your version, insert a line shape or use the hyphen shortcut. Word for the web may not expose every desktop drawing or formatting command; open the file in Word for Microsoft 365 on Windows or Mac for the full set of controls.

Frequently Asked Questions

What is the quickest way to insert a straight line in Word?
For a full-width divider, type three hyphens in a blank paragraph and press Enter, provided AutoFormat is enabled. For a line with a custom length, choose Insert > Shapes > Line and drag while holding Shift.

How do I make a line horizontal instead of diagonal?
When drawing a line shape, hold Shift as you drag. Word constrains the angle, allowing you to make a horizontal or vertical line as well as a 45-degree diagonal.

Can I change the color or thickness of a line?
Yes. Select a line shape, open Shape Format, and choose Shape Outline to adjust its color, weight, or dash style. A horizontal rule may have separate formatting options, depending on the Word version.

How do I remove a line in Word?
For a shape, select its edge and press Delete. For a paragraph border, click in the paragraph associated with it and choose No Border from the Borders menu. If a hyphen shortcut just converted, Ctrl+Z on Windows or Command+Z on Mac may undo it.

Why does my line go across the whole page?
A paragraph rule is designed to span the text area between the margins. Use a line shape if you need a shorter stroke, then set its endpoints by dragging or adjust its width and position.

Can I insert a line in Word for the web?
Some drawing and formatting controls may be limited or absent in Word for the web, and the available options can change. If you cannot find Shapes or the required line controls, open the document in the desktop Word app and use the steps above.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.