DEV Community

ashiq
ashiq

Posted on

I Built a Tool to Fix PAN Card Photo Upload Errors (NSDL/UTI)

While helping someone apply for a PAN card online, I noticed something surprisingly frustrating:

The application itself was easy.
The photo upload process was not.

The NSDL and UTI portals reject uploads for reasons like:

file too large
invalid dimensions
unsupported format
incorrect signature size

For many users, especially on mobile, resizing an image to exactly under 50KB while keeping the correct dimensions is harder than filling the actual form.

PAN Card Upload Requirements
Photo
3.5cm × 2.5cm
JPEG format
under 50KB
Signature
3.5cm × 1.5cm
JPEG format
under 30KB

The problem is that modern phone photos are usually multiple megabytes in size. Compressing them manually often destroys quality or changes the aspect ratio.

The Main Problem

Most existing tools:

upload files to servers
add watermarks
compress aggressively
don’t target Indian government form requirements specifically

I wanted something simpler:

browser-based
privacy-friendly
mobile-friendly
instant output

So I built a lightweight PAN card resizer tool.

What the Tool Does

The tool automatically:

resizes images to the required dimensions
compresses them below the required KB limit
exports them in JPEG format
works directly in the browser

No server upload is required.

Tech Approach

A few things I focused on while building it:

client-side image processing
canvas-based resizing
adaptive compression
preserving readability after compression
mobile responsiveness

One challenge was balancing image quality with extremely small file size limits like 30KB and 50KB.

Government portals are strict, so the output has to consistently stay within limits while still remaining visually acceptable.

Why I Think This Problem Exists

A lot of Indian government systems still use older upload standards:

tiny file size requirements
fixed aspect ratios
strict JPEG-only validation

But modern devices generate large HEIC/JPG images automatically.

That mismatch creates friction for millions of users.

The Tool

If you want to try it:

OptiKit PAN Card Resizer

It’s free and works on both desktop and mobile browsers.

Top comments (0)