How to Connect Lines in Adobe Illustrator
Connecting lines in Illustrator sounds straightforward — but the method that works best depends on what kind of lines you're working with, whether they share anchor points, and what the final result needs to look like. There are several distinct approaches, and choosing the wrong one can leave you with invisible gaps, misaligned paths, or shapes that won't fill correctly.
Here's a clear breakdown of how it all works.
Why Connecting Lines Isn't Always One-Click Simple
Illustrator works with vector paths — mathematical lines defined by anchor points and direction handles. When you draw multiple lines, each one is typically its own separate open path. Connecting them means either merging those paths into a single continuous path or joining their endpoints so they behave as one shape.
The key distinction to understand upfront: joining and connecting are related but not identical operations in Illustrator. Joining closes gaps between endpoints. Connecting can also mean visually aligning paths that don't need to be merged.
Method 1: Using the Join Command (Ctrl/Cmd + J)
This is the most direct method for connecting two open paths at their endpoints.
How it works:
- Use the Selection Tool (V) to select both paths you want to connect.
- Press Ctrl+J (Windows) or Cmd+J (Mac), or go to Object > Path > Join.
- Illustrator will create a straight segment between the nearest open endpoints of the two paths.
If the endpoints are perfectly overlapping, the Join command merges them into a single anchor point. If there's a gap, it draws a straight line segment between them.
Important: This only works on open paths. If you're working with closed shapes, the Join command behaves differently and may not do what you expect.
Method 2: Connecting Lines with the Direct Selection Tool
When you need precise control over which endpoints are connected, use the Direct Selection Tool (A).
- Click the Direct Selection Tool in the toolbar.
- Click on the endpoint of the first line to select it (you'll see it turn solid blue).
- Hold Shift and click the endpoint of the second line.
- Press Ctrl+J or Cmd+J to join those two specific points.
This approach gives you control when paths have multiple endpoints and you don't want Illustrator guessing which ones to connect.
Method 3: The Join Tool 🔗
Introduced in more recent versions of Illustrator, the Join Tool (nested under the Shaper Tool in the toolbar) lets you literally draw a stroke across a gap between two open paths to connect them.
How it works:
- Select the Join Tool from the toolbar.
- Drag across the area where the two open path endpoints meet.
- Illustrator automatically trims or extends the paths and connects them.
This is particularly useful when lines don't align cleanly — the Join Tool handles slight overlaps and gaps intelligently without requiring perfect endpoint placement first.
Method 4: Connecting Lines into a Closed Shape
If your goal is to connect multiple lines into a closed shape (for filling with color, applying effects, etc.), the process adds one extra step.
After joining all your open paths into a single connected path, go to Object > Path > Join one final time (or press Ctrl/Cmd+J) to close the path by connecting the last two remaining open endpoints. Once the path is closed, the Fill attribute will behave as expected.
A common issue: paths that look visually closed but aren't actually closed in Illustrator's data. You can check this by going to Window > Document Info or looking at whether the Fill applies to the interior as expected.
Method 5: Using Pathfinder or Shape Builder for Complex Combinations
When you're connecting multiple overlapping lines or segments to build a single unified shape, the Pathfinder panel (Window > Pathfinder) and the Shape Builder Tool (Shift+M) offer more power.
| Tool | Best For | What It Does |
|---|---|---|
| Join (Cmd+J) | Two open paths | Connects endpoints directly |
| Join Tool | Paths with gaps or overlaps | Intelligently trims and connects |
| Shape Builder | Multiple overlapping paths | Merges regions interactively |
| Pathfinder > Unite | Complex shapes | Combines all selected paths into one |
Shape Builder is particularly useful for illustration work — you drag across segments you want to keep, and Illustrator deletes or merges the rest.
Common Problems When Connecting Lines
Lines won't join: Check that both paths are genuinely open (not closed). Also verify you're selecting the actual endpoints, not points in the middle of a path.
Gap appears after joining: If endpoints aren't at the same coordinates, Join creates a visible straight segment. Use Smart Guides (Ctrl/Cmd+U) to snap endpoints together before joining.
Fill isn't working after connecting: The path likely isn't fully closed. Select the path, open the Stroke/Fill panel, and look at the path's open/closed status.
Paths are on different layers: Illustrator can join paths across layers, but it will move the result to the top layer. If layer organization matters, consolidate your lines first.
The Variable That Changes Everything 🎯
The right method depends on a few factors unique to your file: whether you're working with hand-drawn paths from the Pencil Tool, placed geometric lines, paths imported from another program, or segments from a live trace. Each of these behaves slightly differently at the endpoint level.
Paths created with the Pen Tool typically have precise endpoints and respond predictably to Cmd+J. Pencil Tool paths may have slightly offset endpoints that need the Join Tool's cleanup. Imported or expanded paths sometimes have hidden anchor points that complicate things further.
Understanding which kind of paths you're working with — and whether those paths are truly open, overlapping, or already touching — is what determines which connection method will give you a clean result.