How to use
- Pick the document type — US Passport, India Passport, or
India Visa / OCI.
- Drop a clear, front-facing photo. Face detection auto-positions the crop box on the right with eyes
aligned and the head at the official ratio.
- Drag the crop box if you want to fine-tune. Choose the background colour, toggle background
replacement, then click Generate photo.
- Review the compliance checks, then download the photo or a 4×6 inch print sheet. To re-tune the
crop, click Adjust crop & regenerate.
Compliance notes
US Passport (travel.state.gov)
2×2 inch (51×51 mm), head 1–1⅜ in tall, eyes 1⅛–1⅜ in
from bottom, plain white background, no glasses, taken within last 6 months.
India Passport (Passport Seva)
35×45 mm, head 25–35 mm tall, eyes ~28–35 mm from
bottom, plain white background, neutral expression, sharp focus.
India Visa / OCI
Square 2×2 inch, head 50–69% of photo height, plain light
background, no patterns.
Tips for the best results
The auto-crop and background-replacement models work best on photos that look like they were taken for a
passport in the first place. Here's what works and what doesn't:
Use a photo that has
- One person, looking straight at the camera
- The whole head and the top of the shoulders visible
- Even, diffuse lighting on the face - no hard side-shadows
- A reasonably plain background (any colour - the tool replaces it)
- Sharp focus on the face; eyes open, mouth closed
- No filter or beauty mode applied by the camera app
- Natural expression — slight smile is OK; teeth not showing
- Resolution of at least 600 × 600 px (most modern phones are far above this)
Avoid photos with
- Profile, three-quarter, or tilted-head poses - face detection needs near-frontal
- Glasses (US passport rule), sunglasses, or heavy lens reflections
- Hats or hoods (religious head coverings are OK if the face is fully visible)
- Hair covering the eyes, eyebrows, or one side of the face
- Hands, microphones, or other objects close to the face
- Strong shadows on the face or behind the subject
- Busy, patterned, or low-contrast backgrounds — these confuse the segmenter and may produce
noisy edges
- Wearing white against a white wall (the segmenter can't tell where you end)
- Extreme zoom-in (face touching the frame edges) or extreme zoom-out (face under ~30% of the
image)
- Group photos, even cropped — the model can lock onto the wrong face
Limitations of this tool
Because everything runs in your browser with no upload, there are some things this tool cannot
check or fix. Knowing these up-front will save you a re-take:
- It doesn't grade photo quality. Blur, motion, glare on glasses, red-eye, harsh
shadows, and over- or under-exposure are not detected. The compliance checks only verify size,
ratio, and file size — not whether the photo itself is acceptable.
- It doesn't enforce the rules. No detection of glasses, smile/teeth, head coverings,
both-ears-visible, or whether the photo was taken recently. You're responsible for these.
- Background segmentation is approximate. Fine flyaway hair, glasses lenses,
headscarves, and busy backgrounds can produce visible halos or chipped edges. If the result looks
rough, retake with a plainer background and try again.
- The crop is axis-aligned. If your head is tilted in the source photo, the eyes will
be tilted in the output. The tool does not auto-rotate to level the eyes — re-shoot upright.
- Auto-alignment can miss. The face detector occasionally fails on profiles, distance
shots, or strongly lit/shadowed faces. When it does, drag the crop box on the right manually.
- No colour-profile management. Wide-gamut iPhone photos are converted to sRGB;
subtle colour shifts may appear.
- First load needs the internet. ~5 MB of models download from public CDNs (jsdelivr,
Google) on first use. Some corporate or school networks block these. Once cached, the tool works
fully offline.
- Older / low-RAM devices may struggle. Photos above ~16 MP can hit memory limits on
phones with less than 4 GB RAM. The tool downscales automatically, but very large HEIC files from
new iPhones may still be slow.
- The compliance checks are necessary but not sufficient. A "passing" photo here may
still be rejected by the actual passport portal if the lighting, expression, or sharpness don't meet
their reviewer's bar. We aim for the technical specs; final acceptance is up to the issuing
authority.
FAQs
Is my photo uploaded anywhere?
No. The whole pipeline — face detection, background
removal, cropping — runs locally in your browser using WebAssembly. Nothing leaves your device.
What about the background-removal model?
It's downloaded once (~1 MB MediaPipe
selfie segmenter) and cached by your browser, then runs entirely offline. You can turn it off in
Options.
Will this be accepted by the passport office?
It produces a photo that meets the
published technical specs (size, head ratio, DPI). Acceptance also depends on lighting, expression, and
image quality of your original photo. We surface compliance warnings so you can re-shoot if needed.
Can I use this on a phone?
Yes. Modern Android Chrome and iOS Safari (15+) work;
older devices may run out of memory on very large photos — the tool downscales automatically.