Clear, practical technology insights BSOD Code Lookup · Windows Error Code Lookup · Wi-Fi Troubleshooting · PC Troubleshooting Checklist

How to Draw Straight Lines in Adobe Illustrator

Draw single or connected straight lines with Illustrator’s Line Segment and Pen tools, then edit strokes, angles and anchor points.

Table of Contents

The quickest way to draw one straight line in Illustrator is the Line Segment tool: press the backslash key (), then drag across the artboard. Use the Pen tool when you need a connected path made from several straight segments, an open polyline, or a closed shape.

Straight vector line in Adobe Illustrator
A straight Illustrator path is defined by two anchor points connected by a segment.

Method 1: Draw a line with the Line Segment tool

  1. Select the Line Segment tool from the toolbar or press .
  2. Drag from the starting point to the endpoint.
  3. Hold Shift while dragging to constrain the line to standard angles.
  4. Set the stroke color and weight in the Properties, Control or Stroke panel.

For an exact length and angle, click once on the artboard with the Line Segment tool instead of dragging, enter the values in the dialog, and confirm. A line needs a visible stroke; a fill alone does not make an open path visible.

Method 2: Draw connected straight segments with the Pen tool

1. Select the Pen tool

Choose the Pen tool or press P. The small x beside the cursor indicates that the next click will begin a new path.

Pen tool selected in Adobe Illustrator
The Pen tool creates anchor points and connects them with path segments.

2. Place the first two anchor points

Click once at the start of the line, then click once at the endpoint. Do not drag: dragging creates direction handles for a curve. If that happens accidentally, undo with Ctrl+Z on Windows or Command+Z on macOS and click again.

Two anchor points connected by a straight segment
A second click completes the first visible segment.

Hold Shift while placing the next anchor point to constrain the new segment to a multiple of 45 degrees.

3. Continue or finish the path

Continue clicking to add connected straight segments. The path remains open until you connect the last point to the first.

Several straight segments in an open Illustrator path
Each click adds a corner anchor point and another straight segment.

To finish an open path, press Esc, select another tool, or deselect the path. To close it, move the Pen cursor over the first anchor point and click when the small circle appears.

Closing a Pen path in Illustrator
A circle beside the Pen cursor indicates that clicking will close the path.
Closed path made from straight segments
A closed path can carry both a fill and a stroke.

Edit the line after drawing it

  • Use Direct Selection (A) to move one endpoint or anchor point.
  • Use the Selection tool (V) to move, scale or rotate the whole path.
  • Change width, cap, corner, dash and alignment in the Stroke panel.
  • Enable Smart Guides when you need visual alignment feedback.
  • Enter exact coordinates in the Transform panel for production measurements.

Add or remove anchor points

A straight path normally needs only the points that define its corners. Extra points make editing harder and can create accidental bends.

Remove a point without deleting the whole path

Select the Delete Anchor Point tool or press the minus key (-), then click the point. Illustrator redraws the path between the neighboring anchors, so check the resulting shape.

Deleting an anchor point from an Illustrator path
Removing an unnecessary point simplifies a path but can change its outline.

Add a point for a new edit

Select the Add Anchor Point tool or press the plus key (+), then click the path segment. Switch to Direct Selection to move or reshape the new point.

Adding an anchor point to an Illustrator path
Add a point only where the path needs another editable corner or segment.
Straight-line path edited with anchor points
Keep straight paths simple and use as few anchor points as the geometry requires.

Troubleshooting

ProblemFix
The line is invisibleApply a stroke color and a visible stroke weight
The Pen creates a curveClick without dragging, or convert the point to a corner
The next click keeps extending the old pathPress Esc before starting the new path
The angle is slightly offHold Shift or enter an exact angle
The path is hard to editRemove redundant anchor points and use Direct Selection

Adobe provides current instructions for the Pen tool and Line Segment tool. On TipsMake, see how to draw basic shapes, how to transform Illustrator objects, and the Illustrator shortcut reference.

Discussion

Reader Comments 0

Sign in with email or Google to join the discussion.