Head size is measured to the crown
Most rules measure from the bottom of the chin to the crown, the top of the head. The UK and Australia say clearly that this is not the top of the hair. The US visa rule is the exception: it measures to the top of the hair.
Printed and digital rules are different
A printed size such as 35 × 45 mm says nothing about pixels. When a form wants a file, look for the pixel size and the KB range. If only a printed size is given, 300 DPI is the usual print resolution: 35 × 45 mm is 413 × 531 px, and 2 × 2 in is 600 × 600 px.
Some countries do not accept home-made photos
Canada requires a commercial photographer, and Australia asks for professional prints and recommends against online photo services. For those documents, use this page to understand the rules, then visit a photographer. For US passports and visas, UK digital photos and Schengen visas, you can make the photo yourself with our tools.
The tool on this page
The tool above opens at 413 × 531 px, the 35 × 45 mm size at 300 DPI, with general face guides. Change the width, height and KB limits to match any other document, or use one of the dedicated tools linked in the table, which already contain the official numbers.