The fastest way to join two lines in Illustrator

To join two lines in Illustrator, select both endpoints you want to connect, then use the Join command under the Object menu. The two lines will merge into a single path at those points. This works whether the endpoints are touching or separated by space — Illustrator will connect them either way.

The Join command is the standard tool for this task because it handles the most common scenarios: connecting two open paths, closing a single open path into a shape, or merging multiple line segments into one continuous line. You do not need the lines to be perfectly aligned; Illustrator will join them at their current endpoints.

Key Takeaways

  • Select both endpoints you want to join by clicking one endpoint, then Shift-clicking the second endpoint while the Selection tool is active.
  • Open the Object menu, choose Path, then click Join to merge the two lines at those points.
  • If the endpoints are not touching, Illustrator draws a straight line segment between them to complete the connection.
  • You can also use the keyboard shortcut Ctrl+J (Windows) or Cmd+J (Mac) after selecting the endpoints.
  • The Pen tool can join paths by clicking directly on an endpoint of an existing line, then continuing to draw.

Selecting the endpoints you want to join

Before you can join lines, you need to tell Illustrator which endpoints to connect. Switch to the Selection tool (the arrow at the top of the toolbar, or press V). Click on the first endpoint you want to join — it will turn into a small square showing it is selected.

Hold Shift and click on the second endpoint. Both endpoints should now appear as selected squares. If you select the wrong endpoint, click elsewhere on the canvas to deselect everything, then start over. Selecting the correct endpoints is the most common place people get stuck, because it is easy to click on the line itself instead of the endpoint.

If your lines are very small or close together, zoom in before selecting. Use the scroll wheel or press the plus key to zoom in, which makes the endpoints much easier to target. Once both endpoints are selected, you are ready to join them.

Using the Object menu to join paths

With both endpoints selected, go to the Object menu at the top of the screen. Hover over Path — a submenu will appear. Click Join from that submenu. The two lines will instantly merge at those endpoints.

If the endpoints were already touching, the join is seamless and invisible. If they were separated by space, Illustrator draws a straight line segment between them to complete the connection. Either way, you now have a single continuous path instead of two separate lines.

If the Join option appears grayed out, it means you do not have two endpoints selected. Go back and check that you have selected exactly two endpoints, not the lines themselves or other objects.

Using the keyboard shortcut instead

Once you have both endpoints selected, you can skip the menu entirely. Press Ctrl+J on Windows or Cmd+J on Mac. The lines will join immediately. This shortcut is much faster if you are joining many lines in a row.

The keyboard shortcut does exactly the same thing as the menu command — there is no difference in the result. Use whichever method feels faster to you. Many designers memorize the shortcut after joining a few lines, because it saves time compared to navigating the menu each time.

Joining lines that are not touching

Illustrator does not require your endpoints to be touching before you join them. If you select two endpoints that are separated by space, the Join command will draw a straight line segment between them. This is useful when you want to connect two lines that are close but not quite aligned.

The new segment will be the same color and stroke weight as the path it is being added to. If the two lines have different stroke weights or colors, Illustrator uses the properties of the first path you selected. If you want a different result, undo the join, adjust the stroke properties, and try again.

Closing an open path into a shape

If you have a single open path — a line with two endpoints that do not connect — you can close it into a shape by selecting both endpoints and using Join. This is faster than drawing a new line segment to close the gap manually.

Select the first endpoint of the open path, Shift-click the second endpoint, then press Ctrl+J (or Cmd+J on Mac). The path will close, and you will have a complete shape. This works for any open path, whether it is a simple line or a complex curve with many anchor points.

Using the Pen tool to join as you draw

If you are drawing new lines and want to join them as you go, use the Pen tool. After you finish drawing one line, click directly on the endpoint of an existing line with the Pen tool active. Illustrator will automatically join the new line to that endpoint, and you can continue drawing from there.

This method is useful when you are building a shape piece by piece. You do not have to finish all the lines first and then join them — you can join them during the drawing process. Click on an endpoint to join, and the Pen tool will recognize it and merge the paths.

Frequently Asked Questions

What if I join the wrong endpoints?

Press Ctrl+Z (or Cmd+Z on Mac) to undo the join. Then select the correct endpoints and join again. Undo works instantly, so do not worry about making mistakes — you can always reverse the last action.

Can I join more than two endpoints at once?

No, the Join command works on exactly two endpoints. If you need to join multiple lines, join them two at a time. Select the first pair, join them, then select the next pair and join again.

Why does my joined line look broken or have a gap?

The endpoints may not be perfectly aligned. Zoom in and check that both endpoints are selected before joining. If they are far apart, Illustrator will draw a visible line segment between them, which is correct behavior.

Does joining change the color or thickness of my lines?

The joined path takes the stroke properties of the first line you selected. If the two lines had different colors or weights, the result will match the first one. Undo and select them in the opposite order if you want different properties.

Can I join curved lines the same way as straight lines?

Yes, the Join command works on any type of path — straight lines, curves, or a mix of both. Select the endpoints and join them the same way. The result will be a single path with all the curves and angles from both original lines.