Pakistan version. Set up for Pakistani recruitment forms: the target starts at 29 KB so a photo clears the FPSC rule of "less than 30 KB" in JPEG, however the portal counts a kilobyte. US version

Compress a Photo to Under 30 KB for Online Applications

Reduce a passport-size photo to under 30 KB in JPEG for FPSC and other online job forms in Pakistan. Set the KB limit; the photo never leaves your phone.

The interactive tool loads here when JavaScript runs.

About this tool

What is the Image Compressor?

The Federal Public Service Commission takes applications online only, and step 2 of its form asks for a recent passport size picture in JPEG that is less than 30 KB. A phone camera saves a portrait of several megabytes, so the photo straight from the gallery is far over the limit. This page opens with 29 in the Target size box. Add the photo and it comes back as a JPEG under that limit, at the highest quality that fits.

Why 29 and not 30? The tool reads a limit of N KB as N × 1,000 bytes. With 30, the result could land on exactly 30,000 bytes, which is 30.0 KB by a 1,000-byte count and so not "less than 30 KB". At 29 the ceiling is 29,000 bytes: 29.0 KB on one count and 28.32 KB on the other, under the line both ways.

Not every Pakistani form wants a tiny file. The DGIP online passport service for overseas Pakistanis asks for a colour picture on a white background at 350/467 pixels and up to 3 MB, so squeezing that photo to 29 KB throws away detail for nothing. Read the limit in the form you are filling in, then type it here. Compression runs in your browser, so the photo is not uploaded anywhere by this page.

  • Batch compression with drag and drop
  • Quality slider from 10% to 100% in 5% steps
  • Optional target size in KB for upload limits such as "under 50 KB"
  • Exact output size and an honest smaller or larger label
  • Transparent areas filled white instead of black
  • Removes EXIF and GPS metadata as a side effect
  • Runs locally in your browser
Read the guide: Resize, Convert, Compress: A Practical Order for Web Images

Updated

How to use the Image Compressor

  1. Set Compression Quality first. 80% is the default and a sensible starting point for photos.
  2. Drag images onto the upload area or click Choose Images. You can select many files at once.
  3. Check each card: it shows the original and compressed size and whether the file got smaller or larger.
  4. Change the slider and click Recompress All to try another quality on the same files.
  5. Click Download on a card, or Download All. Files are saved as name_compressed.jpg.

Worked examples

A phone portrait for the FPSC form

Input

IMG_2290.jpg, 3.1 MB, 3000 × 4000 pixels; Target size 29 KB; quality slider at 80%

Output

A JPEG of at most 29,000 bytes, shown on the card as 28.32 KB or less, with the quality and pixel size the search settled on

kbBand(0, 29) gives a ceiling of 29,000 bytes. If even 30% quality cannot get the full 12 MP photo under it, the tool scales the pixels down step by step and prints the final width and height. A head-and-shoulders crop first leaves more bytes for the face.

Why 30 is the wrong number to type

Input

Same photo, Target size 30 KB

Output

Ceiling of 30,000 bytes: 29.30 KB if the portal divides by 1,024, but 30.00 KB if it divides by 1,000

The FPSC guideline says "less than 30 KB". A file of exactly 30,000 bytes passes the first reading and fails the second, so leave yourself one kilobyte of room.

A passport renewal photo that should not be compressed this hard

Input

Overseas renewal on the DGIP online portal, which allows up to 3 MB

Output

Leave Target size empty and use the Image Resizer for the 350/467 pixel size instead

A 350 × 467 JPEG is a small fraction of 3 MB, so there is no size problem to solve. Forcing it to 29 KB would only make the face blockier.

Background and insight

JPEG, standardised as ITU-T T.81 in 1992, is lossy. It splits the image into 8×8 blocks, transforms each with a discrete cosine transform, and then divides the result by a quantisation table. The quality setting scales that table: lower quality means coarser rounding, more zeros and a smaller file. Between roughly 70% and 85% most photos lose very little visible detail while shrinking a lot, and below about 50% blocking and colour banding start to show, especially in skies and gradients.

The quality number is not a standard unit. Every encoder maps it to its own tables, so 80 in a browser canvas is not the same as 80 in Photoshop, libjpeg-turbo or MozJPEG. Judge by looking at the output, not by the number.

JPEG has no alpha channel. When a transparent PNG goes through a canvas into JPEG, the transparent pixels would normally come out black. This tool paints a white background first, which is what most people expect for logos and screenshots. If you need to keep transparency, convert to WebP or PNG with the Image Format Converter instead.

Common use cases

  • Meeting upload limits

    Get photos under the size cap of a form, CMS, job portal or support ticket system.

  • Faster web pages

    Shrink blog and product photos before uploading them so pages load faster on mobile connections.

  • Emailing a batch of photos

    Compress a set of phone pictures so they fit in one email instead of five.

  • Stripping location before sharing

    Re-encoding removes EXIF, including GPS coordinates, from photos you post publicly.

Tips and limitations

  • Use a recent, formal photo. The FPSC guideline tells candidates to avoid uploading informal pictures.
  • Crop to head and shoulders before compressing. Fewer pixels of background means more of the 29 KB goes to the face.
  • Keep your original photo. Compressing an already compressed copy loses detail every time.
  • The download is always .jpg, which is the only format the FPSC step 2 upload accepts.

Sources and further reading

  1. Guidelines for Online Application Submission at FPSC (updated 09-09-2025), Federal Public Service Commission. Step 2: recent passport size picture in jpg/jpeg, less than 30 KB; online applications only
  2. Online Passport, Directorate General of Immigration & Passports. Colour picture, white background, 350/467 pixels, JPEG, not more than 3 MB
  3. HTMLCanvasElement: toBlob() method, MDN Web Docs. The JPEG quality argument the search varies

Frequently asked questions

What photo size does FPSC accept in the online application?

FPSC's online application guidelines ask for a recent passport size picture in JPEG that is less than 30 KB, uploaded with the Choose File button in step 2. They do not set a pixel size. Use a target of 29 KB here so the file is under 30 KB on any reading.

Why does the portal still reject my 30 KB photo?

Systems disagree on what a kilobyte is: some count 1,000 bytes and some 1,024. A file of 30,500 bytes is 30.5 KB on the first count, which fails, and 29.8 KB on the second, which passes. Exactly 30,000 bytes is 30.0 KB on the first count, which is not less than 30. Aim for 29,000 bytes or less and both readings pass.

Can I keep the photo sharp at under 30 KB?

Usually, if the photo is small in pixels first. A 350 × 467 portrait has 163,450 pixels; a 12 MP phone photo has about 73 times as many, so at the same 29 KB each pixel gets far fewer bytes and the result looks blocky. Resize or crop first, then compress, and check the quality figure on the result card.

Does the DGIP online passport photo need to be under 30 KB as well?

No. DGIP's online passport page asks for a colour picture with a white background at 350/467 pixels in JPEG, not more than 3 MB. The resizing matters there, not the compression. The Image Resizer can produce that pixel size.

Is my CNIC photo or picture uploaded to your server?

No. The photo is decoded and re-encoded on a canvas inside your browser, and nothing is sent to a server. The compressed copy also loses EXIF data such as the phone model and location.

My upload turns black around the edges. Why?

That happens when a transparent PNG is saved as JPEG without a background. This tool fills transparency with white before encoding, which is also the background most Pakistani form photos ask for.

Is there an in-depth guide to the Image Compressor?

Yes. “Resize, Convert, Compress: A Practical Order for Web Images” covers the background, how it works, common pitfalls and worked examples. Read the full guide.