The generator (server-side)
When you upload a photo to the generator, the server detects the primary face and estimates the chin and the top of the head. It then crops around those points and places the head at a target fraction of the frame. The goal is a 2×2 inch layout with the head inside the 50–69% range used by US passport guidance.
What happens to the background depends on the document. For passport photos the crop is the output — your photographed background is kept pixel for pixel, because the rules ask for an original, unedited image. If that background isn't plain, the report tells you to retake; it does not paint in a white wall and then call the photo compliant. For visa (DS-160) photos this preset cuts the portrait out and places it on a plain white backdrop. That is a choice our tool makes, not an official endorsement: the published requirement is a plain white or off-white background, and an edited image can still be rejected by the automated validator or a consular officer. If you want an unedited file, use the passport crop. Neither path applies beauty filters, face retouching, or generative fill.
The generated report flags measurable or estimated issues such as:
- Head size: estimated head height as a percentage of the frame, with a 50–69% target.
- Centering: whether the face sits near the horizontal center of the crop.
- Eye line: whether the eyes fall in a reasonable position inside the frame.
- Background: border sampling for a plain white or off-white backdrop, including tone spread and shadow-like variation.
- Output geometry: square dimensions and the expected print layout.
What the generator estimates, not decides
Head height is an estimate. Hair volume, a hat, a tilted head, a hand near the face, or a busy background can move the detected top of the head. The tool uses a second pass to include hair above the hairline where possible, but it cannot know how an adjudicator will read an ambiguous photo. The background check samples the border; it cannot see a shadow that falls only across the middle of the frame.
The local spec checker (browser-side)
The local checker reads a file you choose and analyzes it in the browser. The file is not uploaded. It checks:
- Pixel dimensions and aspect ratio for the selected preset.
- File format and file size against the published limits.
- Border background uniformity, using the same sampling idea as the server check.
- Embedded JPEG density (DPI) metadata, when present.
- Filename characters that can confuse some upload forms.
How hard each preset applies the shape rule follows the rule it is modelled on. Print and DS-160 files must already be square when you upload them, so a non-square file fails those presets. The online renewal preset expects the original photo: the renewal application crops it inside the form, so a rectangular original, or one outside our 600–1200 px crop target, is reported as caution with an explanation rather than as a fail. Byte limits and “your browser can’t decode this file” stay real failures or “cannot check” in every preset.
It does not check head height, expression, glasses, photo age, print quality, or whether an agency will accept the photo. Those appear as “cannot check” items so the report does not imply more certainty than it has.
Where each number comes from
Every limit on this site belongs to one of three kinds, and the table labels each one so you can audit it:
- Official — published by the agency that decides (State Department, CEAC, IRCC, HM Passport Office). We copy the number and link the page.
- Derived — arithmetic on an official number, not a new rule. For example 300 ppi × 2×2 inches gives 600×600 pixels; CEAC’s ≤20:1 compression guidance at 24-bit implies roughly 54 KB at 600×600.
- Site threshold — our own engineering cutoff or crop target, chosen to be conservative. These are not agency rules, and a file outside them is advice, not a rejection.
The earlier version of this page said all thresholds were “copied from published rules”. That was too broad: the sharpness cutoffs and the source head-pixel targets below are ours.
| Check | What the tool does | Kind and source of the number |
|---|---|---|
| Printed head height | Estimates chin and top of hair, then reports the head as a share of the crop. Target on a 2×2 inch print is 1–1⅜ inches. | Official: State Department photo requirements and composition template |
| Digital head height | Reports the head as a percentage of image height against the 50–69% range. | Official: State Department composition template (visa photos) |
| Eye line | Places the eyes within the frame and flags a crop that sits outside the published band. | Official: eye height 56–69% of image height, same template |
| Background | Samples the border, measures tone spread and shadow-like variation, and flags a colour cast. | Official rule, site method: the plain white or off-white requirement is published; sampling only the border, and the spread cutoffs we call “plain”, are ours. |
| Face sharpness and source detail | Scores Laplacian variance on the face region and the head height in the source pixels; a soft or tiny source is flagged before you pay for an upscaled file. | Site threshold: sharpness ≥ 60 passes, < 25 is a hard problem, and a source head ≥ 180 px passes, < 120 px is a hard problem. No agency publishes these numbers; they bound how far we are willing to enlarge real detail into the 600 px output. |
| File format and size | Reads the actual file. DS-160: square JPEG with a 600–1200 px edge, 240 KB or less. Online renewal: JPEG, PNG or HEIC/HEIF from 54 KB to 10 MB, cropped inside the application. | Official for the formats, byte cap and the CEAC square pixel range; derived for the 54 KB floor; site threshold for the 600–1200 px band the renewal preset reports, which is our crop target rather than a published renewal cap. |
| Pixel density | Reads embedded JPEG density and checks the pixel count against 300 ppi for the chosen print size. | Derived: 300 ppi × print size, which gives 600×600 for a 2×2 inch photo. 300 ppi is our print-quality working target, not a government-published figure. |
The generator is built for US sizes: a 2×2 inch print and a square digital file. Other countries use different paper sizes, so the crop maths is the same but the output is not. The country-by-country page lists the printed sizes and head heights for the US, Canada, the UK and Australia, each with its official source. When an agency changes a number, the checker is updated to match and the affected guide gets a new updated date.
How to read the result
The two tools report differently, so the wording is listed for each. Neither scale measures acceptance.
Local checker (one status per check, plus an overall)
- Pass: the measurable value is inside the range used by the preset.
- Caution: the value is close to a limit, depends on how the file will be used, or is outside one of our own crop targets rather than a published rule.
- Fail: the file is outside a limit the preset treats as required; fix it before submitting.
- Cannot check: the rule needs a human or an official review, or your browser could not decode the file. These are never counted as passes and never make the overall result fail.
Generator (one verdict for the whole photo)
- Likely OK — every check came back inside its range.
- Needs retake — at least one check is a definite problem: wrong head size, off-center crop, non-plain background, a soft face, or a too-small source.
- Cannot confirm — nothing failed outright, but at least one check could not be measured reliably, so the tool declines to call the photo good.
“Cannot confirm” is not a pass, and it does not mean the photo is bad — it means the tool could not tell. The free preview and the HD file stay available whatever the verdict is, but the paid print pack can only be bought for a “Likely OK” photo, so a “Needs retake” or “Cannot confirm” result asks for a new upload instead of charging you for a file the tool is not confident about. A pack you already bought is never withdrawn because of a re-check.
A pass is not an acceptance. It means the file or crop looks reasonable against the published numbers. The issuing agency, acceptance facility, embassy, consulate, or USCIS makes the final decision.
Four worked examples you can re-run
Each example uses a small file linked from this page, so you can repeat it with your own
copy of the checker instead of trusting our word. The files are synthetic test patterns —
a head-and-shoulders shape on a plain near-white backdrop, no person, no personal data — generated
by a script kept in the repository
(scripts/make_checker_samples.py). None of these is a customer case, a store
print, or evidence that an agency accepted anything. Each result is labelled as either
measured in the checker or computed by arithmetic.
1. A rectangular original for online renewal: advice, not a fail
- Input: renewal-original-1200x1600.png — 1200×1600 px, exactly 100,000 bytes.
- Steps: open /check, select “Online passport renewal (MyTravelGov-style)”, choose the file, run the checks.
- Result (measured): aspect ratio caution, with the note that the renewal application crops the original inside the form; dimensions pass (the shortest edge, 1200 px, sits at the top of our own 600–1200 px crop target); file size pass (100,000 bytes is inside the official 54 KB–10 MB band). Overall caution, with no failing check.
- Why: the renewal upload publishes a byte range and does its own cropping; it publishes no square-pixel rule. A rectangular original is the normal input there, so failing it would be a false alarm.
- Limit: this covers shape and bytes only. Whether your head survives the form's crop is still something you look at on screen.
2. A DS-160 file that really is out of limits: fail
- Input: ds160-square-600x600.jpg (600×600 JPEG, 71,680 bytes) and ds160-over-240kb.jpg — the same image with filler bytes, 300,000 bytes.
- Steps: /check, preset “US visa DS-160 / CEAC digital”, run each file.
- Result (measured): the 71,680-byte file passes square shape, the 600–1200 px edge, JPEG format, and the size band (the report labels the 54,000-byte floor as 53 KB). The 300,000-byte file is still square and still a JPEG, but reports file size fail, and the overall result becomes fail.
- Also measured: undecodable-truncated.png (47 bytes: a real PNG header whose pixel data was cut off) cannot be decoded, so shape, dimensions and background come back cannot check with a “your browser could not open this file” note; the format check calls it a caution because CEAC wants a JPEG; and its 47-byte size is read from the file itself and reported against our derived 54,000-byte floor as a caution, not a fail, because that floor is arithmetic rather than a published minimum. That is a local decoding limit, not a verdict on your photo.
- Limit: CEAC's own validator also weighs compression ratio and image quality. Inside our byte band is not the same as accepted by them.
3. What “scale to fit” does to a 2×2 print
- Input: the 600×600 px HD file this site exports, printed against the 300 ppi working target at a 2×2 inch layout.
- Computed (arithmetic, no printer involved): 600 px ÷ 300 ppi = 2.00 in on a side. Ask the dialog for 95% scaling and it becomes 2.00 × 0.95 = 1.90 in. Every measured distance shrinks by the same factor, so a head taking 60% of the frame — 1.20 in at full size — prints at 1.14 in, and a head already near the top of the band, 68% or 1.36 in, drops to 1.29 in.
- What that means: the photo must be 2×2 inches, so a 1.90 × 1.90 inch print no longer meets the size requirement, even though both heads above still fall inside the 1–1⅜ inch head-height band. Staying inside the head band does not rescue the outer size: one measurement out of range is enough for the sheet to be the wrong photo.
- Use: print at 100% / actual size with any “fit to page” or scaling option turned off, then measure the finished sheet twice — the outside edge (must be 2×2 in) and the head from chin to top of hair (must be 1–1⅜ in). A printer that silently shrinks the image is the usual reason a correct file comes out the wrong size.
- Limit: 300 ppi is our own print-quality target, not a published government figure, and real printers add their own margins and scaling. Measure the printed sheet when the number matters.
4. Every measurable check passes and the photo can still be wrong
- Input: ds160-square-600x600.jpg again — a drawn test pattern with no face in it at all.
- Result (measured): with the print or DS-160 preset, format, file size, shape, pixel dimensions, and the border-background sampling all come back pass. Under the report, the checker still lists six items it marks cannot auto-check: head height / face proportion, expression & eyes, glasses, filters or beauty and AI edits, photo age, and final agency acceptance.
- Meaning: a clean local report means the file's numbers are inside the limits. It says nothing about the person in the picture — which is exactly why a faceless test pattern can pass it.
- Limit: for the pixel-level checks a real face needs the server generator, and even its “Likely OK” is an estimate against published numbers, not an approval.
Privacy difference
The generator needs a server request to crop, check, and build downloads. The local checker does not. If you only want to sanity-check dimensions, file size, or border background, use /check and keep the file on your device. See the privacy policy for retention details.
Known limits
- It cannot judge whether a photo was taken within the last six months.
- It cannot check every appearance rule — only the ones that leave a measurable trace in the pixels.
- It cannot reliably detect subtle beauty filters or generative retouching.
- It cannot verify print quality, paper type, or whether a kiosk scaled the file.
- It cannot review a head covering, medical exception, or signed statement.
- It cannot predict how a specific adjudicator will treat a borderline photo.
For the rules themselves, start with the rules summary and the individual guides. For corrections to this page, use the contact page.