Use this page as a quick reference before you crop. The most common passport photo size in the world is 35 x 45 mm, used for the UK passport photo, Schengen countries and many others. The US and India use a square 2 x 2 inch (51 x 51 mm) format.
Once you know your size, open the passport photo size tool, pick your country and the correct dimensions are applied for you. Need a visa photo? Countries like China use their own sizes, and those are covered too.
Tips for a photo that gets accepted: face the camera straight on, keep a neutral expression, use a plain light background, and avoid shadows on your face