How to Insert a Small Vertical Line in Word and Format It

How-to basics · Updated November 21, 2026

To insert a small vertical line in Microsoft Word, choose Insert > Shapes > Line, then drag while holding Shift to keep the line straight up and down. Release the mouse when it is the height you want. You can then change its thickness, color, and position. This works well for a short divider, a marker beside text, or a simple visual accent.

What You’ll Need

  • Microsoft Word for Microsoft 365 on Windows, or a recent desktop version of Word.
  • A document where you can click or draw near the place the line should appear.
  • Optional: a target height, color, and thickness in mind. A small line might be around 0.2 to 0.5 inches (5 to 13 mm) tall, depending on the design.

The instructions below focus on a drawn line shape, which stays easy to resize and format. If you only need a text character, such as a separator between words, see the tips and FAQ for a quicker alternative.

Step-by-Step

  1. Place the cursor near the intended location. Click in the paragraph or area where you want the line. A Word shape is usually a floating object anchored to a paragraph, so choosing a nearby paragraph first makes it easier to keep the line associated with the right part of the page. If the line belongs in a header or footer, double-click that area before inserting it.
  2. Open the Shapes gallery. On the Windows ribbon, select Insert > Shapes. In the Lines section, choose the plain Line option, usually shown as a diagonal stroke. Avoid choosing an arrow or connector unless you specifically want an arrowhead or need to connect objects.
  3. Draw a short vertical line. Move the pointer to the starting point, press and hold the mouse button, then drag a short distance down or up. While dragging, hold Shift to constrain the line to a straight vertical direction. Release the mouse button first, then release Shift. If you are using a trackpad, click and drag while keeping Shift pressed.
  4. Check that the line is selected. Small circular handles should appear at its ends. If they do not, click the line once. If clicking selects text instead, try clicking directly on the stroke or use Home > Select > Selection Pane to find and select the shape. The Selection Pane is especially helpful when a short, thin line is hard to target.
  5. Set the height and thickness. For a quick adjustment, drag one of the endpoint handles. Dragging an end changes the line’s length; holding Shift while adjusting helps preserve a vertical direction. For a precise length, select the line and look for the Height control in the Shape Format tab’s Size group. Enter a small value, such as 0.25 inches. To make the stroke more visible, choose Shape Format > Shape Outline > Weight and select a thickness. A thin accent often looks best at about 1 to 1.5 points, while a stronger divider can use a heavier weight.
  6. Choose a line color or style. With the line selected, go to Shape Format > Shape Outline and choose a color. The same menu can apply a dash style or other outline options. Use a color with enough contrast against the page, but keep it consistent with nearby text and design elements. If the line disappears, select a darker color or increase its weight.
  7. Position the line where it belongs. Drag the selected line into place. For more control over how it sits beside text, select the shape and open Layout Options, the small button that appears near it. Choose a wrapping option such as In Front of Text if you need to place it freely, or Square if text should flow beside it. For a line that should not disrupt text flow, you can also choose Behind Text, but check that it remains visible. The default wrapping behavior can vary with the document and Word version.
  8. Review the result in context. Click outside the line and look at the surrounding paragraph, page, and nearby objects. Confirm the line is the right size, is not covering letters, and stays in position when you add or remove text. Save the document after you are satisfied. If it shifts unexpectedly, revisit Layout Options and the paragraph to which the shape is anchored.

On Word for Mac: The drawing process is similar. Use Insert > Shapes, choose the line in the Lines section, and drag to draw it; hold Shift during the drag to constrain its direction. When selected, use the contextual Shape Format tab or the formatting controls to change the outline and size. Ribbon labels and the location of the size controls can differ slightly by Mac version. If a specific control is not visible, open the format pane for the selected shape.

Common Mistakes

  • Drawing without holding Shift. A line that looks vertical while zoomed in may actually be slightly slanted. This is noticeable next to text or page borders. Hold Shift while creating it, then inspect it at normal page zoom.
  • Making the line too long. A small mark can become a full-height divider if you drag too far. Start with a short stroke and adjust an endpoint handle, or enter a specific height in the Size controls.
  • Confusing line length with line weight. The height controls how tall the vertical stroke is; Weight controls how thick the stroke looks. If the line is too short, change its height rather than selecting a heavier outline. If it is too faint, change the weight or color rather than making it longer.
  • Using a text character when a shape is needed. The vertical bar character may look like a line, but its height and spacing depend on the font and text size. A shape is more suitable when you need exact placement or consistent size.
  • Ignoring text wrapping and anchoring. A shape can move when the paragraph it is anchored to changes. It can also cover text if its wrapping setting is unsuitable. Choose a nearby anchor paragraph and check Layout Options rather than repeatedly dragging the line back into place.
  • Clicking the wrong control. The line may have endpoint handles, while nearby text or another shape has its own selection border. Select the line itself, or locate it in the Selection Pane, before changing formatting.

Tips

  • Use the vertical bar character for an inline separator. If the goal is a divider between words, names, or short labels on one line, type the vertical bar character | from the keyboard instead of drawing a shape. It behaves like text and moves with the surrounding words. Its appearance can vary by font, so it is not ideal for a precisely sized graphic mark.
  • Use a border for a divider that must follow a paragraph. If you want a continuous line beside a block of text rather than a tiny standalone stroke, a paragraph border may be more reliable. Select the paragraph and use Home > Borders to choose a left or right border. This creates a line tied to the paragraph, though it may extend for the paragraph’s full height.
  • Zoom in while positioning. At a low zoom level, it is easy to place a small line a few pixels away from the intended spot. Zoom in to position the shape accurately, then zoom back out to check how it looks on the page.
  • Keep multiple lines consistent. If you need several marks, format the first line and duplicate it with copy and paste. Then place the copies and adjust any that need a different height. Consistent outline weight and color make a set look intentional.
  • Use alignment tools for precise placement. When aligning the line with other shapes, select the objects and use Shape Format > Align, where available. For a single small mark beside text, careful dragging is usually faster. Word may align objects relative to the page, margins, or selected objects depending on the alignment setting.
  • Consider accessibility and printing. A very pale, hairline stroke can disappear on screen or in print. Use a clear contrast and a weight that remains visible at the document’s actual size. Do not rely on color alone if the line conveys important information.

Troubleshooting

The line came out diagonal. Select and delete it if it is badly angled, then draw again while holding Shift. If the line is already close to vertical, select it and adjust the endpoint handles while holding Shift. Check its angle at normal zoom, since a tiny deviation can be difficult to see when magnified.

I cannot see the line after drawing it. Click where it should be and check whether selection handles appear. If they do, the shape exists but may have a white or very pale outline, a very small weight, or be behind another object. Open Shape Format > Shape Outline, choose a contrasting color, and increase Weight. If you cannot select it, open Home > Select > Selection Pane and select the line from the list.

The line moves when I edit the text. That movement is usually related to its anchor or wrapping. Select it, open Layout Options, and choose a wrapping mode suited to its purpose. If the position controls are available, use See more or the layout settings to adjust its position relative to the page or text. Keeping the line anchored to a paragraph near its intended location can also reduce unexpected movement. Word’s exact controls can vary by version and selected wrapping mode.

The Shape Format tab is missing. Contextual tabs appear only when the shape is selected. Click the line, not the blank page or nearby text. If it is too small to click, use the Selection Pane. If the ribbon is collapsed, expand it or use the search box in Word to find a formatting command.

The line looks different when printed. A thin stroke may be hard to reproduce on a printer, especially in a light color. Increase its Weight, choose a darker outline, and use Print Preview to inspect the page before printing. Also confirm the line is not behind a filled object or outside the printable margins.

Frequently Asked Questions

Can I make a vertical line an exact height?
Yes. Select the line and enter a value in the Height control on the Shape Format tab’s Size group, if it is shown. You can also drag an endpoint handle for an approximate size. Use the document’s measurement units, such as inches or centimeters.

How do I keep the line perfectly vertical?
Hold Shift while dragging to draw the line. If you resize it later, hold Shift as you move an endpoint so the direction remains constrained. A vertical bar typed as text is also upright, but it is a font character rather than a shape.

How do I insert a vertical line between two words?
Type the vertical bar character, |, between the words. For example, you could write Home | Contact. Use a drawn shape only if you need to control the line’s exact height, color, or position independently of the text.

Can the line stay beside a paragraph as text changes?
It can, but a floating shape may shift as the document reflows. Set an appropriate wrapping option and keep the anchor near that paragraph. If you want a line that automatically spans the paragraph’s height, try a paragraph border instead of a small shape.

Can I change the line’s color and thickness later?
Yes. Select the line, then use Shape Format > Shape Outline to choose a color and Shape Outline > Weight to change its thickness. If those options are not visible, first confirm that the line itself is selected.

Will this work in Word for the web?
Word for the web supports many drawing and formatting tasks, but the Shapes and layout controls may be more limited or arranged differently than in desktop Word. If you cannot find the needed size or positioning option, open the document in the desktop app and make the adjustment there.

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.