How can I know if RAM is compatible with my iMac?
I've used Crucial website for all my Mac upgrades and never had a problem.

You can specify which model you want to upgrade and it will give you all the available (safe) upgrades.

In this case: Link

Alternatively you can navigate to the Apple logo on the upper left side of your mac and select About this Mac. Then select the Memory tab and check the specifications for the RAM modules.