ID photo maker (background & sheet)
Upload a portrait and crop it for a real ID photo spec (1-inch, 2-inch, passport, visa…), resampled to 300 dpi pixels, optionally with a colour-distance background swap, then laid out on 5-inch / 6-inch / A4 paper as a full sheet and exported as PNG or JPEG. Everything runs locally in your browser; the background swap is colour keying, not AI matting.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
Photos are processed locally in your browser with Canvas and never uploaded.
Pick a portrait photo first (PNG / JPEG / WebP all work); the tool crops it to the chosen spec and gives you a downloadable file.
No result yet
Result details
Real sizes, crop box and background statistics for this photo — copy them straight out.
Pick a photo and a spec; sizes, crop box and sheet count show up here.
What this tool does
- Electronic ID photos for applications and visas: crop to exact pixels such as 295×413 (1-inch) and export a JPEG ready to upload.
- Your photo was taken against a wall at home: key out the old background by colour distance, composite white or blue, and download the result.
- Printing at a shop: export a 5-inch / 6-inch / A4 sheet holding several copies — 12 one-inch photos fit on a 6-inch sheet.
Example
Input
A 1200 × 1600 portrait; 1-inch spec, face ratio 0.62, no background swap, 6-inch print sheet
Output
Spec: 1 寸(25×35mm) → output 295 × 413px (300 dpi, 2.5 × 3.5cm) Source 1200 × 1600px → crop box 708.57 × 992px at (245.71, 223.36), scale 0.4163× Face ratio 62% (face centre X 0.5, 42% of the top left blank) Background: keeping the original Print sheet: 6 寸相纸(102×152mm) → 3 columns × 4 rows = 12 copies per sheet (each 25 × 35mm, 2mm gap). Size estimate: a 295 × 413px JPEG is about 41.6 KB (at 0.35 bytes per pixel). Common requirements: head about two thirds of the frame, both ears visible, white or blue background, no jewellery and no hat; check the pixel and file-size limits of the application system before uploading. Photo rendered: 295 × 413px (cropped from a 709 × 992px region of the source at (246, 223)) Background: not replaced (original kept) Sheet: 1205 × 1795px holding 3 columns × 4 rows = 12 copies
Every number above comes from this actual image; "Export & download" hands you the real 295×413 px file.
Frequently asked questions
Is the background swap AI matting?
No. It keys out the original background colour by colour distance and composites the new one — the same algorithm as the site’s matting tool. It works when the original background is a solid colour (white wall, blue cloth, photo backdrop); gradients, texture, or a background close to the subject’s colours leave fringes. "Detect the original background" samples the average of the four source corners; untick it and type the colour if the detection is off. Zoom in before submitting.
Are the output pixel sizes exact?
Yes. The spec table converts centimetres at 300 dpi into whole pixels (1-inch = 2.5×3.5cm = 295×413 px, 2-inch = 3.5×5.3cm = 413×626 px, US visa = 5.1×5.1cm = 600×600 px), and the output is exactly those pixels. Most application systems ask for 300 dpi within that pixel range, so the two line up.
How do I position the face?
Three sliders: "Face height ratio" controls how tight the crop is (0.55–0.7 is typical for ID photos), and the horizontal/vertical sliders place the face inside the frame. The conventional ID framing puts the face centre around 40% from the top, which is the default. When the crop cannot reach the requested position the page says "clamped to the edge" instead of silently returning a crooked photo.
Can the sheet go straight to a print shop?
Yes. The sheet converts paper millimetres at 300 dpi (6-inch = 102×152mm = 1205×1795 px), centres copies with a 2 mm gap and paints the paper white. Export the JPEG and ask the shop to print at 100% scale. Switch "Export" back to a single photo for one copy.
Is my photo uploaded?
No. Decoding (createImageBitmap), cropping, scaling, background replacement and the sheet layout all run in your browser with Canvas and local code; the page issues no network request and there is no server-side processing.
Keywords:ID photo makerpassport photo sheet