Selecting objects the same size in Adobe Illustrator

As far as I can tell, Illustrator doesn’t have a feature to select all objects that have the same width and height. Select similar objects has the right kind of idea but it doesn’t work on dimensions. There are forum posts about it but no solutions.

Here, I’ve written a JS script for Illustrator that adds this functionality.

select_equal_size.jsx — Download this to your computer, then in Illustrator go to File, Scripts, Other Script… (Ctrl-F12) and select this file to run it.

The workflow is:

  • Select an object that is the size you want
  • Run the script
  • Click OK in the dialog (and wait a moment if it’s a big document)
  • All objects of that size are now selected

If you have multiple objects selected in the first step, any of those sizes will be included in the final selection.

Be aware that if you have a complicated document (tens of thousands of paths) then the script may be slow and lock up Illustrator for a minute or two. This seems unavoidable since the script needs to examine every path in the document.

Fudge Factor (pt): The width or height is allowed to vary by plus or minus this much. In practice this needs to be slightly greater than zero to work at all. The default value of 0.01 should work fine in normal circumstances where the objects you’re trying to select are actually identical. If you want to select a range of sizes, you can bump up this number accordingly.

Groups: If checked, a group will be included in the final selection if its overall width and height matches the original selection. (Default: checked)

Paths: If checked, a path will be included in the final selection if its width and height matches the original selection. This is probably what you want, but if you’re specifically looking for groups you can turn this off to make the script run faster. (Default: checked)

Once the search finishes, the selection is updated to include all matching objects.


09 May 2020

I just want to tell you that I have loved you for a while. Life saver! ♥

19 Jun 2020


Alan Pirie
27 Aug 2020

This is an amazing script, helped me remove small dots from a random dot pattern. Thank you =)