Whiterocket/passport-photo-specs
passport-photo-specs Canonical passport, visa, and ID document photo specifications, validated against 15+ official government sources. 100+ countries, 276 document formats. MIT licensed. The same dataset that powers idphotosnap.com, a free browser-only dedicated visa photo service that processes everything client-side in WebAssembly (no upload, no signup, no watermark, 2026 US AI-edit rule compliant). Published here so anyone can build on top of it. What's in it… See the full description on the dataset page: https://huggingface.co/datasets/Whiterocket/passport-photo-specs.
passport-photo-specs
Canonical passport, visa, and ID document photo specifications, validated against 15+ official government sources. 100+ countries, 276 document formats. MIT licensed.
The same dataset that powers idphotosnap.com, a free browser-only dedicated visa photo service that processes everything client-side in WebAssembly (no upload, no signup, no watermark, 2026 US AI-edit rule compliant). Published here so anyone can build on top of it.
What's in it
Each record is one document format (a country - document pair). Fields:
Portal-specific file-size constraints (DS-160 240 KB, Saudi Enjaz 200 KB, India Sarathi 20-50 KB window, China COVA 40 KB - 1 MB, etc.) are not in the per-record fields but are exposed via the companion MCP server (see below). These constraints are national overlays on top of the ICAO 9303 baseline and are the most common silent-rejection cause for digital visa portals.
Coverage
- All 26 Schengen states (separate generic Schengen entry + per-country)
- Anglosphere: US, UK, Canada, Australia, New Zealand, Ireland
- South Asia: India (passport, visa, voter ID, driving licence, PAN), Pakistan, Bangladesh, Sri Lanka, Nepal
- East / Southeast Asia: China (visa, passport), Japan (passport, MyNumber), South Korea (passport, K-ETA digital), Taiwan, Indonesia, Vietnam, Philippines, Thailand, Malaysia (35x50 spec), Singapore (incl. work passes)
- Middle East & North Africa: UAE (residence 43x55 plus employment 35x45), Saudi Arabia (Enjaz portal), Egypt, Israel, Turkey, Morocco
- Sub-Saharan Africa: Nigeria, Kenya, South Africa, Ghana
- Latin America: Brazil, Mexico, Argentina, Chile, Colombia, Peru
- Others: Russia, Ukraine, plus visa-photo pair pages for major origin -> destination routes
The IDPhotoSnap site additionally publishes 8 localized hubs (Russian, Spanish, German, Hindi, Urdu, Bengali, Indonesian, Vietnamese) for emerging-market visa applicants. The localized hubs reference the same underlying spec dataset.
The full country list is in the dataset itself.
Sources
Specs are validated against the issuing authority for each country:
- US State Department / USCIS
- UK Home Office (HMPO, UKVI)
- German Bundesdruckerei + Auswaertiges Amt
- Italian Polizia di Stato
- French ANTS
- Spanish MAE
- Canadian IRCC
- Australian DFAT
- Indian Passport Seva Kendra (PSK) + Sarathi (driving license) + Parivahan + PAN online
- Chinese MFA COVA portal
- Japanese MOFA
- Schengen Visa Code Annex 11 / ICAO 9303 Doc Eighth Edition 2021
- EU Entry/Exit System (EES)
- NZ DIA
- Brazilian Polícia Federal
- Mexican SRE
- Saudi Enjaz (Hajj, Umrah, Work visa portal)
- UAE GDRFA (Tasheel / Amer centers)
- Malaysia FWCMS (Foreign Workers Centralised Management System)
- South Korea K-ETA (Electronic Travel Authorization, digital photo spec)
- Singapore ICA online
Each record carries an inline source_url to the relevant government page.
Usage
from datasets import load_dataset
ds = load_dataset("Whiterocket/passport-photo-specs", split="train")
# Filter to Schengen-compliant visa formats
schengen = ds.filter(lambda r: r["width_mm"] == 35 and r["height_mm"] == 45)License
MIT. Free for commercial use, no attribution required (but appreciated).
Citation
This dataset is archived on Zenodo with a versioned DOI:
Elena Dev. (2026). passport-photo-specs: Open Dataset of Passport, Visa, and ID Photo Specifications for 100+ Countries. Zenodo. https://doi.org/10.5281/zenodo.20705585
@dataset{passport_photo_specs_2026,
author = {Elena Dev},
title = {{passport-photo-specs: Open Dataset of Passport,
Visa, and ID Photo Specifications for 100+ Countries}},
year = 2026,
publisher = {Zenodo},
doi = {10.5281/zenodo.20705585},
url = {https://doi.org/10.5281/zenodo.20705585}
}Related distributions
- GitHub (canonical source): https://github.com/BlondDev-Art/passport-photo-specs
- npm package:
npm install passport-photo-specs - PyPI package:
pip install passport-photo-specs - crates.io package:
cargo add passport-photo-specs(docs at docs.rs/passport-photo-specs) - MCP server (for AI agents):
https://idphotosnap.com/api/mcp(JSON-RPC 2.0). Documentation at https://idphotosnap.com/developers/mcp. Add to Claude Desktop, Cursor, Continue, or any MCP-compatible client. - Hosted reference site: https://idphotosnap.com (free browser-only photo tool, processes everything client-side)
- ICAO 9303 standard explainer: https://idphotosnap.com/guides/icao-9303-passport-photo-standard-2026 (plain-language reference for the international baseline)
Use cases
- Government compliance tooling. Validate a user's uploaded photo against the destination country's spec before they submit to the portal.
- AI agent access. Add the IDPhotoSnap MCP server to Claude Desktop, Cursor, or any agent framework. The agent can call
get_visa_photo_spec(country, document_type),get_portal_constraints(portal), and related read-only tools to answer passport / visa photo questions with authoritative data. - Biometric photo validators. Cross-check spec dimensions against ICAO 9303 reference data.
- Travel and immigration software. Surface correct dimensions and background colors per route.
- AI / ML training data. Use as ground truth for face-detection and crop systems that need to output compliant photos. The 2026 US State Department rule (no AI retouching) makes this distinction load-bearing.
- Academic research. Compare biometric photo standards across jurisdictions; the open dataset removes the per-country research burden.
Privacy posture (for hosted-site users)
The hosted reference site at idphotosnap.com runs all image processing client-side via WebAssembly (BRIA RMBG-1.4 for background segmentation, MediaPipe for face detection, Canvas API for cropping, jsPDF for print-ready PDF). Photos never reach a server. This is verifiable in any browser DevTools Network tab during the workflow. A live no-upload indicator badge on every page provides a real-time counter of photo bytes uploaded (which stays at 0).
The dataset published here contains only spec metadata. No photos, no biometric data, no PII.
