The three ways to join two line endpoints in Illustrator

You connect lines in Illustrator by selecting both endpoints and using the Join command, which fuses them into a single path. The method depends on whether your lines already touch, whether you want them to form a corner or a curve, and whether you want to keep both strokes or merge them into one.

The fastest route for most work is to select both line endpoints with the Direct Selection tool (the white arrow), then press Ctrl+J on Windows or Cmd+J on Mac. This creates a straight corner where the lines meet. If the endpoints are far apart, Illustrator draws a new line segment between them. If they overlap slightly, it closes the gap.

For curves that flow smoothly from one line into another, you use the same Join command but first align the endpoints so they sit exactly on top of each other. Illustrator then reads the angle of each line and creates a smooth transition instead of a corner.

Key Takeaways

  • Select both endpoints with the Direct Selection tool (white arrow), then press Ctrl+J (Windows) or Cmd+J (Mac) to join them into one path.
  • If endpoints are not touching, the Join command creates a new straight line segment between them; if they overlap, it closes the gap.
  • To create a smooth curve instead of a corner, position both endpoints exactly on top of each other before joining.
  • You can also use the Pen tool to click on an existing endpoint and continue drawing, which joins the new segment to the old path automatically.

Selecting the right endpoints with the Direct Selection tool

The Direct Selection tool is the white arrow in the toolbar on the left side of your screen. Click it, then click on the endpoint of your first line — you will see a small square appear at that point. Hold Shift and click the endpoint of your second line to add it to the selection. Both endpoints should now show as selected squares.

If you accidentally select the whole line instead of just the endpoint, you clicked in the middle of the stroke. Move closer to the actual end point and try again. The endpoint is the very tip of the line, where it stops.

Once both endpoints are selected, the Join command is ready. You do not need to select anything else — Illustrator knows you want to connect these two specific points.

Using the Join command to create corners

After selecting both endpoints, press Ctrl+J (Windows) or Cmd+J (Mac). Illustrator when ready joins them. If the endpoints were touching or overlapping, the two lines become one continuous path with a corner where they meet. If they were separated, Illustrator adds a straight line segment between them.

The corner created by Join is sharp — the angle depends on the direction each line was traveling when it ended. If one line comes in from the left and the other from above, you get a 90-degree corner. If both lines are nearly parallel, the corner is very acute.

You can adjust the corner afterward using the Direct Selection tool. Click and drag the corner point to reshape it, or use the Smooth tool (in the toolbar under the Pencil tool) to round it out.

Creating smooth curves by aligning endpoints first

If you want the two lines to flow into each other without a visible corner, you need to position their endpoints exactly on top of each other before joining. Use the Direct Selection tool to click and drag one endpoint until it sits directly over the other. Zoom in to make sure they are truly aligned — a small gap will create a visible kink.

Once the endpoints are stacked, press Ctrl+J or Cmd+J. Illustrator reads the angle and direction of each line and creates a smooth curve that connects them. The result looks like one continuous line that changes direction gradually rather than sharply.

This technique works best when both lines have similar angles at their endpoints. If one line ends nearly vertical and the other nearly horizontal, the smooth join will still create a visible bend — it just will not have a sharp corner point.

Joining lines with the Pen tool

You can also join lines by continuing to draw with the Pen tool. Select the Pen tool from the toolbar, then move your cursor over an existing endpoint until a small plus sign appears next to the cursor. Click that endpoint, and you can now draw a new line segment that connects to the old path automatically.

This method is useful when you are building a shape piece by piece and want each new segment to join seamlessly. The Pen tool handles the connection for you — you do not need to use the Join command separately.

The downside is that you have less control over the exact angle and length of the connecting segment. If you need precise positioning, selecting endpoints and using Join is more reliable.

Closing open paths by joining the first and last endpoint

If you have a line that starts at one point and ends at another, and you want to turn it into a closed shape, select both the first endpoint and the last endpoint, then press Ctrl+J or Cmd+J. Illustrator closes the gap by connecting them.

This is how you turn an open path into a closed one — useful when you have drawn most of a shape but left one side open. Once closed, the path can be filled with color, and you can explore strokes to all four sides uniformly.

If the endpoints are far apart, the Join command will create a visible line segment between them. If that is not what you want, undo the join, reposition one endpoint closer to the other, and try again.

Troubleshooting common joining problems

If the Join command does not work, the most common reason is that you have selected the whole line instead of just the endpoints. Undo, switch to the Direct Selection tool, and click directly on the endpoint — the very tip of the line, not the middle of the stroke.

If you selected both endpoints but nothing happened when you pressed Ctrl+J or Cmd+J, check that both endpoints are actually selected. You should see a small square at each one. If only one shows a square, Shift+click the other endpoint to add it to the selection.

If the join created a corner you did not want, you can undo it (Ctrl+Z or Cmd+Z), reposition the endpoints so they overlap exactly, and join again. Illustrator will create a smooth curve instead.

Frequently Asked Questions

What is the difference between joining lines and grouping them?

Joining merges two separate paths into one continuous path with a single stroke. Grouping keeps them as separate objects that move together. Use Join when you want the lines to be a single shape; use Group when you want to move or edit them as a unit but keep them separate.

Can I join more than two lines at once?

You can select more than two endpoints and join them all at once, but Illustrator will only connect pairs. If you select four endpoints, it joins them in the order you selected them. For complex shapes, it is usually clearer to join two lines at a time and build up from there.

Why does my joined line have a visible gap or kink?

The endpoints were not positioned exactly on top of each other. Use the Direct Selection tool to drag one endpoint directly over the other, zoom in to confirm they are aligned, then join again. Even a one-pixel gap will show as a kink in the final path.

Can I undo a join if I change my mind?

Yes. Press Ctrl+Z (Windows) or Cmd+Z (Mac) when ready after joining to undo. The two lines will separate back into their original paths. You can undo multiple times to go back several steps if needed.

What happens if I join two lines that are already touching?

Illustrator fuses them into one path at the point where they touch. If they overlap slightly, the overlap is removed and the lines become one continuous stroke. This is useful for cleaning up shapes where lines were drawn separately but should be one unified path.