Skip to content
ToolShelf

Government form photo and signature maker

Crop a photograph to the shape a form wants and land it under an exact kilobyte limit, and turn a phone picture of your signature into clean ink on white. Nothing is uploaded.

Which form is this for?

Applying for or renewing a Pakistani passport online.

What this portal asks for

  • 35 mm wide by 45 mm high
  • Head between 29 mm and 34 mm from chin to crown
  • Plain white background
  • No more than six months old, in sharp focus, neutral expression
  • Not cropped down from a larger picture, and not edited

From Photograph Requirements, e-Services Portal, read on 29 September 2026. Check it yourself These change without announcement, so the portal in front of you is the authority, not this page.

Worth knowing about this one

The portal contradicts itself on file size. Its text says the photograph may be up to 5 MB, while the photo checker on the same page accepts a maximum of 350 KB. The smaller figure is used here because it is the one that is actually enforced, and a file under it satisfies both.

pixels

pixels

kilobytes

This portal states 35 by 45 mm and no pixel size, which is a printing measurement. The 413 by 531 above is that size at 300 dots per inch: arithmetic rather than a rule, and safe to change if your form asks for something else.

Your photograph and your signature stays in this tab. The work is done by JavaScript in your browser. None of it is uploaded, logged or saved, and the tool keeps working with the network off.

Your photograph

Your signature

Signature size limit

Whatever your form asks for. Currently 50 KB.

None of the three portals above takes a separate signature upload, so there is no verified figure to prefill here. Plenty of other application forms do ask for one, which is why the panel is here.

The gap between a phone and a form

A government portal refuses anything over 30 kilobytes. A phone produces photographs of four megabytes. That is a factor of over a hundred, and the usual way across it is to compress, look at the number, compress again, and eventually overshoot so far that the result is a mosaic.

This does it the other way round: it searches for the highest quality that fits under the limit, rather than the lowest that works. That takes about eight attempts, happens in under a second, and the difference matters. A photo dropped to the floor when three quarters would have fitted is a photo somebody is asked to submit again.

Only when even the lowest quality worth using is still too large does it start reducing the pixel size, and it tells you when it has. At the same number of bytes, a smaller sharp photograph beats a full-size blocky one every time.

Three portals, and why not thirty

Each of the presets here was read from the portal’s own page or its own PDF, and carries the address and the date it was read. That is the reason there are three.

There is no shortage of sites publishing requirements for dozens of Pakistani portals. They disagree with each other. For one provincial commission the figures on offer are 25 KB, 10 to 40 KB, and 140 by 177 pixels, from three pages that each present theirs as fact and none of which cite anything at all. NADRA’s own photo guidelines PDF, which several of them link to, now redirects to the homepage.

Repeating any of that would be passing on a rumour with a date stamp on it. The custom option does the same job without the invention: your portal states its numbers on the upload page, and typing them in takes ten seconds.

Even for the three that are here, the preset fills the fields and the fields stay editable. These requirements change without announcement, and the portal in front of you is the authority rather than this page.

Millimetres are not pixels

Something worth knowing before you fight with a form: all three of these portals specify a size in millimetres, 35 by 45, and a file size in kilobytes. None of them states a pixel count.

Millimetres are a printing measurement and a file does not have one, so converting needs a resolution. 35 by 45 mm at 300 dots per inch is 413 by 531 pixels, which is the figure most commonly quoted for these forms and is arithmetic rather than something any of them published. That is why it appears in an editable field here instead of being presented as the requirement.

One of the three contradicts itself outright. The passport portal’s text says a photograph may be up to 5 MB, while the photo checker on the same page accepts a maximum of 350 KB. The smaller figure is used, because it is the one actually enforced and a file under it satisfies both readings. The page says so rather than quietly picking one.

Cleaning up a signature

What people have is a signature on a sheet of paper, photographed on a phone: grey, unevenly lit, with a lot of page around the writing. What the form wants is dark ink on white, cropped, under some number of kilobytes.

The work is choosing the brightness below which a pixel counts as ink. Too high and the shadow across the page comes along with the writing; too low and half the signature disappears. A fixed value cannot work, because the right one depends entirely on the light in the room, so it is calculated from the picture’s own histogram by finding the split that leaves the two groups as tightly clustered as possible.

It stays a slider, because a photograph with a strong shadow has three groups rather than two and no automatic choice is going to be right. The percentage beside it is how much of the picture is currently counted as ink, and much above a third means a shadow rather than a signature.

One detail that is easy to get wrong: the strokes are not reduced to pure black and pure white. The pixels along the edge of every stroke are partly ink and partly paper, and rounding each one to a side throws that away and leaves the writing jagged. A short ramp is kept either side of the threshold, while the paper still clears to true white, which is the part the form is checking.

None of it leaves your browser

A photograph of your face and an image of your signature are about the two most personal files you own. They are also exactly what a free tool would be tempted to collect.

Everything here runs in this tab, using your browser’s own image handling. There is no request in this page that could send a file anywhere, nothing is stored, and it keeps working with the network turned off, which is the only demonstration of that claim worth anything.

What this cannot do is judge the photograph. It gets the shape, the size and the file size right, which is what most rejections are about, but whether the background is plain enough, the expression neutral, or the head the right proportion of the frame are decisions a person or a checking system makes. Those rules are listed beside each portal here, and they are worth reading before you take the photograph rather than after it comes back.

Questions

Why are there only three portals?
Because those are the three whose requirements could be read from the portal's own page or its own PDF. There is a large supply of sites listing figures for dozens of Pakistani portals and they contradict each other: for one provincial commission the numbers on offer are 25 KB, 10 to 40 KB, and 140 by 177 pixels, from three pages that each state theirs as fact and none of which cite anything. NADRA's own photo guidelines PDF, which several of them link to, now redirects to the homepage. Passing that on with this site's name attached would be worse than leaving it out, so the custom option is there instead and it does the same job.
My portal is not listed. Can I still use this?
Yes, and nothing is lost by doing so. Choose the last option and type in the width, height and size limit your form is asking for. The useful part of this tool is hitting an exact pixel size and an exact kilobyte ceiling with a correct crop, and that works the same whatever the numbers are. Your portal states them on the upload page, usually right beside the button.
The portal says 35 by 45 mm. Why does this show pixels?
Because a millimetre is a printing measurement and a file does not have one. All three of these portals specify a printed size and a file size, and none of them states a pixel count at all. Converting needs a resolution: 35 by 45 mm at 300 dots per inch is 413 by 531 pixels, which is the figure most commonly quoted for these forms. That is arithmetic rather than a rule any of them published, which is why the fields are editable.
How does it get the file under 30 KB without ruining it?
By searching for the highest quality that fits rather than dropping to the lowest that works. JPEG size falls as quality falls, so a binary search finds the best setting in about eight attempts. Only when even the lowest acceptable quality is still too big does it start making the picture smaller, because a smaller sharp photograph beats a full-size blocky one at the same number of bytes. The result says which quality it settled on and whether the size had to come down.
Why can I not drag the corners of the crop box?
Because a drag-only control cannot be used from a keyboard, has nothing for a screen reader to announce, and fights the scroll on a phone. The frame here is fixed to the required proportions and you move the picture inside it with a zoom and two positions, which are three sliders and work everywhere. You can also drag the picture itself, which is the obvious gesture, but it is never the only way to do anything. A side effect is that the output cannot come out at the wrong shape, whatever you do to it.
How does the signature cleanup work?
It finds the brightness that best separates the ink from the paper, using the picture's own histogram rather than a fixed number, because the right value depends entirely on the light in the room. Everything below it becomes black, everything above becomes white, and the result is cropped to the writing. A short ramp is kept at the edge of each stroke rather than a hard two-colour split, which is what stops the signature coming out jagged. The slider starts where the picture suggested and is there because a photograph with a shadow across it has no single right answer.
My signature comes out broken up, or the shadow comes with it. What do I do?
Move the slider. Towards the lighter end takes in more of the faint parts of the writing; towards the darker end leaves more of the page behind. The percentage beside it is how much of the picture is currently being counted as ink, and a warning appears above about a third, which almost always means a shadow rather than a signature. Photographing the page from directly above in even daylight, with no flash, fixes more than any setting will.
Do my photo and signature get uploaded anywhere?
No. Everything happens in this tab, using your browser's own image handling. There is no request in this page that could send a file anywhere, nothing is stored, and it keeps working with the network off. That matters more here than on most pages: a photograph of your face and an image of your signature are about the two most sensitive files you own, and they are exactly what a free site would be tempted to collect.
Is the photo I get guaranteed to be accepted?
No. This gets the dimensions, the shape and the file size right, which is what most rejections are actually about. It cannot judge the things a human or a checking system looks at: whether the background is plain enough, whether your expression is neutral, whether the head is the right proportion of the frame, whether there is a shadow behind you. Those are in the requirements shown beside each portal, and they are worth reading before you take the photograph rather than after.
Why does it say my photo is being enlarged?
Because the part you have framed contains fewer pixels than the output size, so it has to be stretched up, which looks soft and blurred and is a common reason for rejection. It happens when you zoom a long way into a small picture, or start from a screenshot or a WhatsApp image, which are heavily reduced already. Zoom out, or go back to the original photograph rather than a copy that has been through a messaging app.

More tools