Skip to main content

passport-photo-specs (Python)

PyPI version License: MIT DOI

Canonical passport, visa, and ID document photo specifications validated against 15+ official government sources. 100+ countries, 248 document formats. Python distribution of the passport-photo-specs dataset.

Useful for:

  • Building passport / visa photo tools without re-researching per-country specs
  • Validating photo uploads before submitting to a government portal (DS-160, COVA, Sarathi, voters.eci.gov.in, etc.)
  • Immigration / visa software that needs correct dimensions and background colors
  • ML training corpora for biometric photo compliance
  • Research on ICAO 9303 / biometric photo standards across jurisdictions

Install

pip install passport-photo-specs

Quick start

from passport_photo_specs import find_document, find_country, countries, documents

# Look up a specific document
italy_visa = find_document("italy-visa-photo")
print(italy_visa["widthMm"], italy_visa["heightMm"], italy_visa["dpi"])
# 35 45 300

# Look up a country (by id or by any of its document slugs)
italy = find_country("italy")
print(italy["name"], len(italy["documents"]))
# Italy 3

# Iterate everything
print(f"Total countries: {len(countries())}")
print(f"Total document formats: {len(documents())}")

# Get the raw dict if you want to walk it yourself
from passport_photo_specs import raw
all_data = raw()

What's in each document spec

{
    "id": "italy-visa",
    "countryId": "italy",
    "name": "Italian Visa",
    "slug": "italy-visa-photo",
    "widthMm": 35,
    "heightMm": 45,
    "widthPx": 413,
    "heightPx": 531,
    "dpi": 300,
    "background": "Plain light grey",
    "bgColor": "#eeeeee",
    "bgColorLabel": "Light grey",
    "requirements": ["Size: 35×45 mm", ...],
    "seoTitle": "...",
    "h1": "...",
    "faq": [{"q": "...", "a": "..."}, ...],
}

Source-of-truth: validated against the issuing-authority's published guidance. The full source list is in the parent repository's README.

Citation

This dataset is archived on Zenodo with a citable DOI. Use the concept DOI to always resolve to the latest version:

whitetirocket. (2026). passport-photo-specs: Open Dataset of Passport, Visa, and ID Photo Specifications for 100+ Countries. Zenodo. https://doi.org/10.5281/zenodo.20409880

See also

License

MIT. See LICENSE.

Metadata

Release files for passport-photo-specs 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for passport-photo-specs 1.3.0
File Size Uploaded
passport_photo_specs-1.3.0.tar.gz 15.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for passport-photo-specs 1.3.0
File Interpreter ABI Platform
passport_photo_specs-1.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 29.1 kB

Release files / passport_photo_specs-1.3.0.tar.gz

Download URL passport_photo_specs-1.3.0.tar.gz
Size 15.3 kB
Tags Source
SHA-256 checksum
How to use checksums
5316c57cb14906776d51316adb9e95754e61946ccafffb6fca378303bd739cec
BLAKE2b-256 checksum
How to use checksums
686e0187e0270ba2b6333212ff87dfe76f3876d1be2b4a9a128a840f08c16109
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Release files / passport_photo_specs-1.3.0-py3-none-any.whl

Download URL passport_photo_specs-1.3.0-py3-none-any.whl
Size 13.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7c5ddc3a66aa0cb9628c51a80a0ef4a657fc69badf1e097e98fe2d3cda33ef50
BLAKE2b-256 checksum
How to use checksums
ef40c43dd20d1981e879f73fb666cf5af99951836b1cd0186931aebbd55a48c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Release history Release notifications | RSS feed

This release

1.3.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page