Skip to content

PDF and image tools

The file an online form rejects for being over the size limit, the 4,000-pixel-wide photo meant for a 400-pixel profile picture: these tools sort it out on your device, with no upload.

Tools in this category

Which tool for which problem?

ProblemToolWhat changes
PDF too big to attachCompress a PDFThe file size; the page count stays the same
Photo too heavy, dimensions fineCompress an imageThe file size, and the format if you like (JPG, PNG, WebP)
Image too large in pixelsResize an imageWidth and height, and so the file size too

Limits worth knowing first

To save space, PDF compression turns each page into an image. The text can no longer be selected or searched, and links, bookmarks and form fields are lost. With a PDF that is all text, the result can even be larger than the original; the tool tells you so and suggests keeping the file you started with.

For images, JPEG has no transparency, so transparent areas turn white. WebP keeps it and often gives a smaller file for photos. PNG is lossless and the browser cannot squeeze it further, so the saving mostly comes from reducing the dimensions.

Why nothing is uploaded

Your browser opens and rewrites the files itself, using Mozilla PDF.js for PDFs and the canvas element for images. A bank statement or a scanned passport never passes through a server, and a large file does not have to make the round trip.

Pixels, megabytes and email attachments, in numbers

A 4,000 × 3,000 pixel photo has 12 million pixels. Scaled down to 2,000 × 1,500, it has 3 million, a quarter as many. While working on it, the browser keeps four values per pixel (red, green, blue and transparency, according to the MDN documentation for ImageData), which means 48 MB of memory for the large photo and 12 MB for the small one. That is why it pays to reduce a photo's dimensions first.

For a sharp print, allow 2,480 × 3,508 pixels for A4 at 300 dpi and 1,181 × 1,772 pixels for a 10 × 15 cm print.

An email does not carry a file as it is: the RFC 2045 standard encodes it in base64, 4 characters for every 3 bytes. A 15 MB PDF therefore takes up about 20 MB once attached, enough to go over a size limit. Often it is enough to shrink a PDF before sending it or compress photos to JPG or WebP.

Frequently asked questions

For a photo, should I compress or resize?
If the image is bigger than it will be displayed, resize first: going from 4,000 to 2,000 pixels wide cuts the number of pixels by four. Then compress if it is still too heavy.
Why is my compressed PDF bigger?
Because it was mostly text. Once turned into images, its pages take up more space than the original text did. Keep the original file.
Do my files go through a server?
No, they stay on your device.