I have these diagonal lines in my artboard which I want to make vertical lines.

The horizonal lines are easy to make vertical but how can I make the diagonal lines also vertical?

I tried several options but failed, there seems no other topic on here which solves my problem.

Hope there is someone with the knowledge!

Diagonal lines into straight lines

EDIT: What I actually mean is this line down here is a diagonal. I want this to be rotated so it gets a straight line (horizontal or vertical). enter image description here

  • ermm.. huh? You can't align the anchors?
    – Scott
    Apr 24, 2021 at 22:39
  • Do you mean to rotate the M so one of the diagonal lines are vertical (and all the other lines are then diagonal)? Or do you perhaps mean that you want the diagonal lines to be parallel (not vertical)?
    – Wolff
    Apr 25, 2021 at 8:46
  • I added some drawing in the post to make it more clear
    – Yucel
    Apr 26, 2021 at 12:16

2 Answers 2


(updated answer after seeing your question edit)

There's an easy way to rotate one end of a line, while the other end stays in place:

  • make sure you have Smart guides turned on
  • create a vertical guideline touching one of the anchors
  • hit R to rotate and click that very same anchor point (mouse cursor will change). This will make the line rotate around that point (locks the point in place).
  • grab the other anchor point and move it towards the guideline until it snaps
  • release

enter image description here


If the path you wish to make vertical is part of a larger path, you can align anchors. This only works if all anchors on path are not selected.

  • Use the Direct Selection Tool (white arrow)
  • Select the top anchor and the bottom anchor
  • Click the vertical align options in the Align Panel

Anchors can be aligned if they are individually selected.

enter image description here

If you aren't concerned with maintaining any specific anchor position, you can use average

  • Select the path
  • Choose Object > Path > Average
  • Tick Vertical and hit OK

enter image description here

This averages the two anchors, aligning them vertically essentially in the middle of where the two anchors started. Sort of the same as "align on center".

If your path consists of only two anchors, and you want to maintain the existing position of one of the anchors.... see @Lucian's rotate method.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.