The three ways to join separate lines into one continuous path
In Illustrator, you can connect two separate line segments into a single path using the Join command, which merges their endpoints. The fastest route is to select both lines, then go to Object > Path > Join (or press Ctrl+J on Windows, Cmd+J on Mac). This works when the endpoints are already touching or very close together. If the endpoints are far apart, Illustrator will draw a straight line segment between them to close the gap. If you want to connect lines without creating that bridge segment, use the Combine Paths option instead, which keeps them as separate segments within one path.
The other method is to use the Pen tool to manually draw a connecting segment between two endpoints, which gives you full control over the shape and angle of the connection. This takes longer but is useful when you need the connection to follow a specific curve or direction rather than a straight line.
Key Takeaways
- The Join command (Object > Path > Join or Ctrl+J/Cmd+J) connects two line endpoints into a single path, and draws a straight segment between them if they don't touch.
- Both lines must be selected before you join them, and the endpoints you want to connect should be at or very near the same location for a clean result.
- If endpoints are far apart, Illustrator will still join them but will create a visible bridge line, which you can delete afterward if you don't want it.
- The Pen tool lets you manually draw a connection between endpoints with full control over the curve, useful when a straight line won't work for your design.
Preparing your lines for joining
Before you join lines, both segments need to be selected. Click the first line with the Selection tool (the arrow at the top of the toolbar), then hold Shift and click the second line. Both should now show selection handles at their endpoints. If you have more than two lines to connect, Shift+click each one to add it to the selection.
Check that the endpoints you want to connect are actually touching or nearly touching. Zoom in if needed — use the View menu or press the plus key to zoom closer. If the endpoints are separated by even a small gap, the Join command will still work but will create a visible line segment between them. You can move an endpoint closer using the Direct Selection tool (the white arrow) by clicking and dragging it into position.
Using the Join command for straight connections
Once both lines are selected, open the Object menu at the top, hover over Path, and click Join. On Windows, the keyboard shortcut is Ctrl+J; on Mac, it is Cmd+J. Illustrator will immediately merge the two paths into one. If the endpoints were touching, the result is a single continuous line with no visible bridge. If they were separated, a straight line segment now connects them.
If that bridge segment is not what you wanted, you can undo the join (Ctrl+Z or Cmd+Z) and reposition the endpoints before trying again. Alternatively, you can delete the bridge segment after joining: switch to the Direct Selection tool, click on the bridge line to select it, and press Delete.
Connecting lines with the Pen tool for custom curves
The Pen tool gives you more control over how lines connect. Select the Pen tool from the toolbar (it looks like a pen nib), then click on the endpoint of the first line. Move your cursor to the endpoint of the second line and click again. Illustrator draws a new segment between the two points. If you want the connection to curve rather than be straight, click and drag when you place the second point to create a curve handle.
This method is slower than the Join command but is necessary when you need the connecting segment to follow a specific shape or angle. You can also use the Pen tool to add intermediate points along the connection if you need more control over the curve's direction.
Fixing common joining problems
If the Join command is grayed out in the menu, you likely have only one line selected, or you have selected objects that are not paths (such as text or images). Make sure both lines are selected and that they are actual path objects, not strokes on shapes. You can convert a stroke to a path by selecting it and going to Object > Path > Outline Stroke.
If you join two lines but the result looks wrong — for example, the connection goes to the wrong endpoint — undo the join and try again. Sometimes Illustrator connects the endpoints you did not intend. Reposition the endpoints so the ones you want to join are closest to each other, then join again. You can also use the Reverse Path Direction option (Object > Path > Reverse Path) on one of the lines before joining if the endpoints are oriented the wrong way.
Joining multiple lines into a single shape
To connect more than two lines, select all of them at once (Shift+click each one), then use the Join command. Illustrator will connect them in sequence based on which endpoints are closest to each other. The result is a single path made up of all the segments. This is useful when you have drawn a shape with separate line segments and want to convert it into one unified path so you can apply a stroke color or fill to the whole thing at once.
If the lines do not connect in the order you expected, undo and reposition them so the endpoints you want to connect are touching or very close. You can also join them two at a time instead of all at once, which gives you more control over the order.
When to use Combine Paths instead of Join
The Combine Paths option (Object > Path > Combine Paths or Ctrl+8 on Windows, Cmd+8 on Mac) groups multiple paths into one object without merging their endpoints. Use this when you want to treat separate lines as a single unit for moving or styling, but you do not want them physically connected. For example, if you have drawn three separate lines that form a shape but do not touch, Combine Paths lets you select and move all three together without creating bridge segments between them.
After combining, you can still edit each individual line segment using the Direct Selection tool. The paths remain separate internally but behave as one object in the layers panel and when you apply transformations.
Frequently Asked Questions
What if my endpoints are not exactly touching when I join them?
Illustrator will still join them and create a straight line segment between the endpoints. If you do not want that bridge line, undo the join, move the endpoints closer together using the Direct Selection tool, and try again. Alternatively, delete the bridge segment after joining by selecting it with the Direct Selection tool and pressing Delete.
Can I join more than two lines at once?
Yes. Select all the lines you want to join by Shift+clicking each one, then use Object > Path > Join or press Ctrl+J (Windows) or Cmd+J (Mac). Illustrator connects them based on which endpoints are closest to each other. If the result is not what you expected, undo and reposition the lines so the correct endpoints are nearest to each other.
Why is the Join command grayed out?
The Join command only works on path objects. If you have selected text, images, or other non-path objects, the command will be unavailable. Make sure both selected items are actual paths. You can convert a stroke to a path by selecting it and going to Object > Path > Outline Stroke.
What is the difference between Join and Combine Paths?
Join merges the endpoints of two paths into a single continuous path, often creating a bridge segment if they do not touch. Combine Paths groups multiple paths into one object without connecting their endpoints. Use Join when you want the lines physically connected; use Combine Paths when you want to treat separate lines as a single unit for moving or styling.
Can I undo a join if I change my mind?
Yes. Press Ctrl+Z (Windows) or Cmd+Z (Mac) immediately after joining to undo. You can also use Edit > Undo Join. If you have made other changes since the join, you may need to undo multiple times to get back to the joined state, then undo once more to separate the lines again.