Shard Tools

Exact pixel resizing

How to resize an image to exact pixels without uploading it

An exact pixel requirement is stricter than making an image smaller. The output has to match the requested width and height, while the subject still needs to look natural.

Start with the shape, not the number

A square target, a wide banner, and a tiny icon each need a different decision. The browser can create the requested canvas, but it cannot make a rectangular source fit a different shape without cropping, padding, or distortion.

Crop-to-fill is useful when the destination must be completely covered. Fit-with-background is safer when the whole image must remain visible. Stretching is the fast path to distorted faces, logos, circles, and text.

Use exact-size pages for real constraints

Exact sizes are most useful when a form, profile field, app icon, banner slot, or upload portal asks for a specific dimension. A page should explain that constraint rather than pretending every pixel pair is equally important.

For very small sizes such as icons, legibility matters more than detail. For larger banner sizes, the important question is which area remains visible after cropping.

Verify the generated output

A trustworthy resizer should show the generated dimensions from the actual output, not just repeat the requested settings. That catches orientation problems and accidental changes before the file is used.

Pixel size is separate from file size. If a form also limits KB or MB, resize first and then compress the generated image if needed.