Passport Photo Maker — free, in your browser
Resize and crop a portrait to the exact passport, visa, or ID-photo spec for 24 countries — Sri Lanka, US, UK, Schengen, India, and more. 300 DPI output, optional print sheet, files never leave your device.
How it works
A passport-conforming photo is a three-rule problem: the file has to be a specific physical size (e.g. 35 × 45 mm), the head has to occupy a specific fraction of that area (e.g. 32–36 mm tall in a 45 mm photo), and the background has to be the colour the issuing authority wants. The tool above takes a portrait, treats those three rules as a deterministic geometry problem, and emits a print-ready file without uploading anything.
The pixel size of the output canvas is derived from the millimetre spec at a fixed 300 DPI — the resolution every photo lab the author has checked accepts without rescaling. The conversion is the NIST definition: 1 inch is exactly 25.4 mm, so the output width is round(widthMm / 25.4 × 300) and the height is the same with heightMm. A 35 × 45 mm Sri Lanka passport photo is therefore 413 × 531 px; a US 2 × 2 in photo is 600 × 600 px.
Given a desired head height — the midpoint of the country's published range — the scale factor that maps source pixels to output pixels is scale = headTargetPx / sourceHeadHeightPx. The crop rectangle in source coordinates has dimensions widthPx / scale × heightPx / scale, and is positioned so the crown of the head lands 10% from the top of the photo (the ICAO 9303 default; per-country head-height fractions account for everything else).
The rendering pipeline uses the same Canvas-API plumbing every modern browser ships: decode the file into an HTMLImageElement, paint the country's background colour as the canvas fill, then run the 9-argument form of drawImage with the computed source rectangle and the full output canvas as the destination. When the crop extends past the source bounds (e.g. a tightly framed selfie zoomed in to meet the 75% head rule), the tool paints the spec's official background colour into the letterbox area rather than stretching the image. Encoding goes through canvas.toBlob at quality 0.92 for JPEG, lossless for PNG.
A cross-check confirms the millimetre path agrees with the inch path: mm / 25.4 × dpi and in × dpi produce the same integer pixel count to within floating-point rounding noise, so the output dimensions match whether the spec publishes inches (US) or millimetres (most of the world).
Worked examples
Country specifications
Each preset on the tool maps to one row in the table below. Pixel dimensions are computed at 300DPI from the published millimetre spec. Head-height percentages reflect the issuing authority's tolerance range.
| Country / document | Photo (mm) | Pixels @ 300 DPI | Head height | Background |
|---|---|---|---|---|
| Sri Lanka passport | 35 × 45 | 413 × 531 | 71–80% | White |
| US passport / visa | 50.8 × 50.8 | 600 × 600 | 50–69% | White |
| UK passport | 35 × 45 | 413 × 531 | 64–76% | Light grey |
| Schengen visa | 35 × 45 | 413 × 531 | 71–80% | White / light grey |
| India passport | 35 × 45 | 413 × 531 | 70–80% | White |
| Canada passport | 50 × 70 | 591 × 827 | 44–51% | White / light grey |
| Australia passport | 35 × 45 | 413 × 531 | 71–80% | White |
| New Zealand passport | 35 × 45 | 413 × 531 | 71–80% | White |
| ICAO 9303 (generic) | 35 × 45 | 413 × 531 | 70–80% | Plain light background |
| Germany passport | 35 × 45 | 413 × 531 | 71–80% | Light grey |
| France passport | 35 × 45 | 413 × 531 | 71–80% | Light grey |
| China visa | 33 × 48 | 390 × 567 | 58–69% | White |
| Japan passport | 35 × 45 | 413 × 531 | 71–80% | White |
| South Korea passport | 35 × 45 | 413 × 531 | 56–78% | White |
| Singapore passport | 35 × 45 | 413 × 531 | 56–78% | White |
| UAE visa | 43 × 55 | 508 × 650 | 60–71% | White |
| Malaysia passport | 35 × 50 | 413 × 591 | 70–80% | Blue |
| Thailand passport | 40 × 50 | 472 × 591 | 65–80% | White |
| Indonesia passport | 35 × 45 | 413 × 531 | 65–80% | Red |
| Pakistan passport | 35 × 45 | 413 × 531 | 70–80% | White |
| Bangladesh passport | 45 × 55 | 531 × 650 | 70–80% | White |
| Brazil passport | 50 × 70 | 591 × 827 | 70–80% | White |
| Russia visa | 35 × 45 | 413 × 531 | 71–80% | White |
| South Africa passport | 35 × 45 | 413 × 531 | 70–80% | White |
Max input size 50 MB. Each country's spec is cited individually in the "Sources & references" section below.
Frequently asked questions
Sources & references
Canvas-API plumbing, ICAO 9303 baseline, and each country's issuing-authority page.
- ICAO Doc 9303 part 3 — Machine Readable Travel Documents
- MDN — CanvasRenderingContext2D.drawImage (9-arg form)
- MDN — HTMLCanvasElement.toBlob (browser-native encoder)
- NIST — SI units, inch = 25.4 mm exactly
Per-country specifications:
- Sri Lanka DIE — passport photo specs
- US Department of State — passport photos
- UK Government — passport photos
- European Commission — short-stay visa policy
- Passport Seva (India MEA) — photo specifications
- IRCC — passport photo specifications
- Australian Passport Office — photo guidelines
- NZ Department of Internal Affairs — photo requirements
- ICAO Doc 9303 part 3
- Bundesdruckerei — biometric photo specs
- Service-public.fr — photo d'identité
- Chinese Visa Application Service Centre
- MOFA Japan — passport photo standards
- Korea Ministry of Foreign Affairs — passport photo
- ICA Singapore — passport photo guidelines
- UAE ICP — visa services
- Jabatan Imigresen Malaysia — passport
- Royal Thai Consulate-General — passport photo
- Direktorat Jenderal Imigrasi — passport
- DGI&P Pakistan — passport application
- Bangladesh e-passport portal
- Polícia Federal — passaporte
- Russian Federation — consular services
- Department of Home Affairs — passports
All sources were last cross-checked on 2026-05-11. The page is reviewed every quarter and when a country updates its biometric photo standard.
Related tools
Comments & feedback
Spotted a bug or want an improvement? Tell us — our team reviews every comment, and good ideas get built. Comments are public and anonymous.
Found a country spec that needs updating, or want a new preset added?
Email me at [email protected] with the issuing authority's page — most updates ship within 24 hours.