This page's code did not start.

Opening index.html directly from a folder blocks JavaScript modules, so nothing will happen when you choose a photo. Serve the folder over http instead:

powershell -ExecutionPolicy Bypass -File serve.ps1

Then open http://localhost:8080/.

ID Photo Maker — passport and visa photos to spec

Choose a supported country and document. Published rules and guidance are marked.

Language: English
View source
Your photos are processed in your browser. No processing upload.

The cropping, the measuring, the background reading and the printing all run in your own browser, on your own hardware, using the JPEG encoder it already ships with. This tool has no network feature of any kind — nothing to fetch, nothing to send — and there is no server on the other end of this page to send a photograph of your face to even if there were.

Live check: checking…

Offline: checking…

Don't take our word for it: open DevTools, watch the Network tab, and make a passport photo. Not one request carries a picture, a thumbnail, a filename, or a byte of what you chose. Or unplug from the internet and make one anyway.

1 Choose the photograph

Any picture your browser can open. A phone photograph taken against a plain wall, in daylight, from about a metre and a half away is what most of these rules were written around — and it is read straight off your disk, not sent anywhere.

2 Pick the country and the document

Every figure below is the published requirement, transcribed from the authority named under it. Nothing about this list is guessed at, and nothing about it is fetched — it is two tables, src/specs.js for the figures and src/sources.js for where each one came from, served with the page.

Document

3 Mark the face, and check the framing

The crown, the chin and each pupil. Those four points are the whole of what a rule measures, so the crop is taken from wherever they end up — drag any that landed wrong, then press Fit the box. Finding them reads the picture itself: the edge of your head against the wall behind it, and the darker patches where eyes are. There is no model in it and nothing is fetched, and it is a starting position rather than a verdict, which is why it is yours to correct and why the panel below says which of the four it could not measure.

The panel beside the photograph is the crop itself, at the shape the rule asks for and with nothing drawn over it. It is what the file will look like, so a framing that is wrong is wrong there before it is downloaded.

Choose a photograph and the crop box appears here.

4 The background

Read from a band across the top of the crop and down each side, above the shoulders — the parts of the frame that ought to be nothing but background. Measured in CIE Lab rather than in RGB, because two greys forty RGB units apart are indistinguishable and forty units of blue is a different colour.

5 Save it

View as Markdown

How to prepare a passport photo

  1. Choose the photograph. A phone picture against a plain wall, in daylight, taken from about a metre and a half away. It is read straight off your disk by the browser; nothing is sent anywhere while you do it.
  2. Pick the country and the document. Type the country’s name into the box, or open its list, then pick which of that country’s documents you are applying for. The panel then shows that rule's print size, head-height band, eye line, background colour and upload limits — along with the authority each figure came from and the date it was read. Nothing on that list is guessed at, and anything you were sent that is not on it goes in under “Anywhere else”.
  3. Check the four dots on your face. Crown, chin, and each pupil — those four points are the whole of what the rule measures. They are placed by measuring the picture itself, and the line under them says which of the four that managed and which it had to work out; drag any that landed wrong, or switch to I’ll place them and do all four yourself. Then press Fit the box and the crop lands where that country wants it.
  4. Read the four checks, and the background. Head height, eye line, centring and tilt, each measured from the box as it stands and each saying which way to drag if it is out. The background is read from the top and the sides of the crop and compared with the colour the rule asks for — unevenness, which is what actually gets photos rejected, is measured separately from colour.
  5. Take the three files. The print, at the exact millimetres with the resolution written into the file so a shop prints it at the right size. The sheet, with as many copies as a ⁦4 × 6⁩ holds and cut marks in the gaps. And the upload, at the pixel size the portal demands and inside the KB band it enforces at both ends.

The longer version

How to take a passport photo that is not sent back What a passport photo is actually measured on - head height, eye line, background - which country wants which numbers, and how to hit the pixel and KB limits an online form enforces.

Photo rules by country

Every rule with published figures has a page of its own that states them, with the authority that published them and the date they were read.

Questions

Is my photo uploaded anywhere?

No. The picture is decoded, cropped, measured and written by your own browser on your own hardware, using the JPEG encoder the browser already ships with. This tool has no network feature of any kind — it never fetches anything and never sends anything — and the page's Content-Security-Policy names every address it may contact, none of which belongs to this site. That is worth more here than on most tools: the file is a photograph of your face.

Which countries are covered?

Enough of them that listing the names here would be a list needing an edit every time one is added, so: every entry is transcribed from the authority that published it, and every entry prints that authority and the date it was read underneath the figures. The chooser is the list — type a country into it and you will know in a second whether it is there. Anything that is not goes under “Anywhere else”, where every figure is yours to type; since most of the world issues against the ICAO geometry, that entry starts on it. A country whose figures nobody publishes is still on the list, and says so on its own entry: the frame is the ⁦35 × 45⁩ mm most of the world issues against, the bands are ICAO’s and are never marked as a failure, and the note tells you what the authority actually says instead — often that it photographs you at the counter. What is not done anywhere here is filling a figure in from what other tools say.

How does it find the crown, the chin and the eyes without a face model?

By using something a general face detector is not allowed to assume and this tool is: every one of these specifications demands the same scene — one person, facing the camera, against a plain evenly-lit wall. So the colour of the wall is read from the border of the picture, everything that is not that colour is the person, and the top of them is the crown, hair included. The pupils are found as the best pair of patches that are darker than their own surroundings, level with each other and either side of the middle of the head — a comparison that is local, so nothing in it depends on what colour a face is. The chin is the one that cannot be found this way, because a jaw against a neck is a soft edge with no colour change across it; it is worked out from the pupils, which sit a little below the middle of a head once the hair on top of it is counted, and then checked against the outline. All of it is arithmetic in src/detect.js: no weights, no inference runtime, nothing fetched, and the same arithmetic for every face put through it. That last part is the one that matters, because a shipped detector is wrong unevenly — worse on some faces than on others — and the people whose photographs already get rejected most often are the ones it would let down.

How much should I trust the dots it places?

Enough to start from, not enough to skip looking at. Each of the four has a photograph it is wrong on: a patterned wall or a bookcase leaves no outline to find a head against, a head cropped at the top has no crown in the picture at all, and spectacles, a heavy fringe or closed eyes can put the pupils on the wrong feature. So the tool says out loud which of the four it measured and which it had to work out, refuses outright on a picture with no plain background in it rather than inventing an answer, and leaves every dot draggable. The crop is taken from where the dots end up, never from where they started. If you would rather place all four yourself, the switch above the picture says I’ll place them, and moving any dot by hand flips to that on its own — from that moment they are yours and nothing will move them again.

What is the head height rule, and why does mine keep failing it?

Every one of these specifications states how much of the frame the head has to fill, measured from the bottom of the chin to the top of the head, hair included — usually 70 to 80 per cent, which for a 45 mm photo is 31.5 to 36 mm. The usual reason it fails is a selfie: an arm's length is about 60 cm, which distorts the face and puts the head too large in the frame. The usual second reason is the crown — it is the top of the hair, not the hairline, and marking the hairline makes every head come out too small.

Why does the file have to be at least 20 KB, and how can it be padded?

Indian examination portals, the Chinese visa form and the UK passport upload all state a minimum file size as well as a maximum, because a file under it is usually a thumbnail somebody uploaded by mistake. A ⁦200 × 230⁩ photograph is 46,000 pixels, and at the best quality a browser will write it can still land at 15 KB, with no way to make it larger by compressing less. So the tool adds a JPEG comment segment full of spaces. That is part of the JPEG standard, every decoder skips it, and the picture is bit-for-bit the same picture — only the file is longer. The padding says exactly that, in English, inside the file.

Does it check the background, and can it replace one?

It checks and will not replace. The colour is read from a band across the top of the crop and down each side, above the shoulders, and compared with the rule's colour in CIE Lab rather than in RGB — two greys forty RGB units apart are indistinguishable and forty units of blue is a different colour. Unevenness is measured separately, because a shadow on a white wall is what actually gets photographs rejected, and it is not a colour problem. Replacing a background means cutting a person out of a picture, which is a segmentation model, and a bad one eats hair. Standing a foot further from the wall fixes more of these than any filter would.

What is the ⁦4 x 6⁩ sheet for?

A booth charges several pounds for six photographs. A photo counter prints a ⁦6 × 4⁩ for pennies and every one of them will do it. So the tool lays as many copies of your photo as the paper holds — eight, for a ⁦35 × 45⁩ on a ⁦6 × 4⁩ — with cut marks in the gaps and nothing printed over a picture. Nothing is scaled to fit: every copy is exactly the size the rule asks for, because a sheet that shrank them by two per cent to fit one more on would be eight photographs that are all the wrong size. Print it at 100 per cent; “fit to page” is what makes a sheet come out wrong.

Why does the DPI matter if the pixels are the same?

Because a JPEG can say what size it is, and if it does not, whatever prints it guesses. The resolution lives in the JFIF header, and a browser canvas writes that header with the units field set to “this is an aspect ratio, not a resolution”. This tool rewrites those few bytes so the file says 300 dpi, which is what turns ⁦413 × 531⁩ pixels into a ⁦35 × 45⁩ mm photograph rather than an image of no particular size. Nothing is decoded to do it and no quality is spent.

Can it do the signature file as well?

Yes. The cited IBPS notice prefers ⁦140 × 60⁩ pixels and requires 10 to 20 KB for a signature JPEG. This preset writes those dimensions; check the current notice for your application. The face overlay is disabled. The tool checks for light paper, visible ink, and lines or page edges in the crop.

Will this guarantee my application is accepted?

No, and no tool honestly can. What it does is apply the published figures exactly and show you every measurement it made, so that the things a form measures automatically — pixel size, file size, format — are right, and the things a human examiner measures — head height, eye line, the background — are in front of you with numbers on them. The rules also change: every specification here says which authority it came from and when it was read, so you can check it against the form in front of you rather than trusting a table.

Is it free, and do I need an account?

It is free, and there is no account, no sign-in, no trial and no watermark printed across your face. There is no limit on how many photographs you make either, because there is no server paying for them. The site carries advertising, which is what pays for it; the ads are not given anything about your photograph.

Does it work offline?

Yes. Load the page once, then disconnect from the internet and it keeps working — the rulebook is a file served with the page, not a lookup. That is also the simplest way to prove nothing is being uploaded: a tool that sent your photograph away to be cropped would stop the moment you unplugged.