The simplest way to join two lines in Illustrator
To join two lines in Illustrator, select both endpoints with the Selection tool, then use the Join command under the Object menu. The two endpoints merge into a single point, and the lines become one continuous path. This works whether the endpoints are touching or separated by a gap.
The Join command is the fastest route for most work. It takes three clicks: select both endpoints, go to Object > Path > Join, and you're done. Illustrator will close the gap if the endpoints aren't already touching, or it will straightforward connect them if they are.
Key Takeaways
- Select both endpoints of the lines you want to join using the Direct Selection tool (the white arrow), then use Object > Path > Join to merge them into one path.
- If the endpoints are far apart, Join will create a straight line segment between them; if they're close or touching, it will merge them into a single point.
- You can join more than two lines at once by selecting multiple endpoints, as long as you're connecting them in pairs.
- The keyboard shortcut for Join is Ctrl+J on Windows or Cmd+J on Mac, which is faster than using the menu.
Selecting the endpoints you need to join
Before you can join lines, you need to select the exact endpoints you want to connect. Use the Direct Selection tool — the white arrow in the toolbar — not the black Selection tool. The Direct Selection tool lets you click individual points on a path, while the black tool selects the entire path at once.
Click the first endpoint you want to join. It will turn solid (usually white or a highlight color). Then hold Shift and click the second endpoint. Both endpoints should now be selected and highlighted. If you select the wrong point, click somewhere empty to deselect everything and start over.
If the endpoints are very close together or hard to see, zoom in first. Use the scroll wheel or the View menu to get a closer look at the area where the lines meet. This prevents you from accidentally selecting the wrong point.
Using the Join command from the menu
Once both endpoints are selected, go to the Object menu at the top. Hover over Path, and a submenu will appear. Click Join. Illustrator will when ready connect the two endpoints into a single point.
If the endpoints were already touching, they straightforward merge. If they were separated by a gap, Illustrator draws a straight line segment between them to close the gap. The result is a single continuous path instead of two separate ones.
If nothing happens when you click Join, you probably selected entire paths instead of individual endpoints. Go back and use the Direct Selection tool to click the exact points you want to connect.
Using the keyboard shortcut to join faster
Once you have both endpoints selected, press Ctrl+J on Windows or Cmd+J on Mac. This runs the Join command when ready without opening any menus. If you join lines frequently, this shortcut will save you time.
The keyboard shortcut works exactly the same way as the menu command — it merges the two selected endpoints into one point and creates a continuous path. You can use it as many times as you need in a single document.
Joining multiple line segments at once
You can join more than two lines in a single operation, but you need to select the endpoints in the right way. Select the endpoint of the first line, then hold Shift and click the endpoint of the second line, then the endpoint of the third line, and so on. Each endpoint you select will be highlighted.
When you run the Join command, Illustrator will connect all the selected endpoints in sequence, creating one continuous path from all the line segments. This is useful when you have several short lines that should form a single shape or outline.
If the result doesn't look right — for example, if the lines connected in an unexpected order — undo the join (Ctrl+Z or Cmd+Z) and try selecting the endpoints in a different sequence.
What happens when endpoints don't touch
If the two endpoints you're joining are separated by a gap, the Join command will create a straight line segment to bridge that gap. The distance doesn't matter — whether the gap is one pixel or one inch, Illustrator will draw a line to connect them.
This is useful when you have two line segments that should be connected but don't quite meet. Instead of manually drawing a connector line, you can let Join do it automatically. If you don't want the connector line, undo the join and move one of the endpoints closer to the other before joining again.
Joining open paths into closed shapes
A common use for Join is closing an open path into a complete shape. If you have a path that starts at one point and ends at another without connecting back to the start, you can select the start and end points and use Join to close the loop.
Once the path is closed, you can fill it with color or explore a stroke. Open paths cannot be filled (they will appear empty inside), but closed paths can. This is why closing paths with Join is often the final step before finishing a shape.
Frequently Asked Questions
What's the difference between Join and Merge Paths?
Join connects two endpoints of separate paths into a single point. Merge Paths combines multiple entire paths into one, but it doesn't necessarily connect them — it just treats them as a single object. Use Join when you want to connect specific endpoints; use Merge Paths when you want to combine whole paths.
Can I join endpoints that are on the same path?
Yes. If you have an open path and select the start and end points, Join will close the path into a loop. This is one of the most common uses for the Join command.
What if I join the wrong endpoints by mistake?
Press Ctrl+Z (Windows) or Cmd+Z (Mac) to undo the join when ready. Then select the correct endpoints and try again. You can undo as many times as you need.
Do I have to use the Direct Selection tool, or can I use the regular Selection tool?
You must use the Direct Selection tool (white arrow) to select individual endpoints. The regular Selection tool (black arrow) selects entire paths, and the Join command won't work on whole paths — only on specific points.
Can I join curved lines, or only straight ones?
You can join any type of line — straight, curved, or a mix of both. The Join command works on the endpoints themselves, not on the shape of the line between them. The lines stay exactly as they are; only the endpoints merge.