I constantly create square background which I should adjust to artboard size.

Almost every time I miss one or two pixels (Retina is good for that), so I looked for one-click feature "click object to artboard size" and didn't find it.

Probably there is a faster way instead of inserting exact parameters of the artboard to the square dimensions?

Illustrator CS6.


5 Answers 5


Just choose Object > Artboards > Fit to Artwork. That will make the artboard fit precisely to the edge of all the artwork, including the background square.

There is no command to scale artwork to match the artboard.

  • I needed as well to transform to "landscape" by clicking shift+O, and choosing the orientation. Jul 29, 2015 at 18:34

A script that takes care of this for you:


  • Hi Runadre, welcome to GDSE and thanks for your answer! Could you elaborate a bit about what the script does, and how it's called? This way your answer is still valuable at a later time in case the link breaks. Thanks!
    – Vincent
    May 20, 2014 at 9:50
  • The script does not work. For me it create a copy of the object of the same size
    – Ilan
    May 20, 2014 at 13:12
  • It *did" create a copy of the shape, but it also did what it was supposed to do... - so it worked for me. Thanks! Sep 24, 2014 at 0:11

If you select the square, there should be a "reference point" square on the "control toolbar". Set the "reference point" of the object to "upper left," and then type in 0,0 for x,y coords and make w,h the same dimensions as the art board.

  • i don't know why but 0.0 does not work because of artboard has another coordinates, but I found other alignment buttons and can now just press align to top and left and afterward - the artboard size.... Thanks
    – Ilan
    Dec 6, 2013 at 17:27
  • you would need to adjust the ruler or do a little math in this case
    – horatio
    Dec 6, 2013 at 17:29
  • yes, I found that clicking in cross point of the H and V rulers and dragging to left-top of artboard zeroes the coordinates...
    – Ilan
    Dec 6, 2013 at 17:30

Try turning on your Smart Guides: View > Smart Guides or Ctrl+U / option+U. If you aim for a corner on your artboard, you'll get a green 'intersect' mention telling you that you're on the exact edge.

Smart guides help with lots and lots of other aligning tasks, too!


I'm done that just select the square path with Direct Selection Tool (A). and go to corner the square, hold ctrl (windows). And then drag the square corner to fit the artboard size.

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.