Canvas-Based Image Resizing Scale Matrix

On this page


    Photos straight from a phone are often 4,000 pixels wide and several megabytes, far more than a blog post or a product page needs. Resizing them is the quickest way to make a page load faster. This tool scales an image to any size, keeps the proportions if you want, and saves it as PNG, JPEG or WebP. The image is processed by your browser; it is never uploaded.

    4000 × 22501200 × 675
    Same 16:9 shape, fewer pixels.
    Drop an image here or click to choose (PNG, JPEG, WebP, GIF, BMP)
    Choose an image to begin.
    Resizing removes metadata such as camera model and GPS location. Transparent areas become white in JPEG.

    Pick the size from where the image is shown

    An image never needs more pixels than the space it fills. A blog column that is 800 CSS pixels wide needs about 800 pixels, or 1,600 for sharp display on high-density phone screens. Anything beyond that only adds download time. The web.dev guide to image formats and its page on responsive images explain how to serve different sizes to different screens.

    UseTypical width
    Blog post body image800 to 1,200 px
    Full-width banner1,600 to 2,000 px
    Product thumbnail400 to 600 px
    Avatar or icon64 to 256 px

    Shrinking is safe, enlarging is not

    Making an image smaller discards detail you did not need. Making it bigger invents pixels by guesswork, so it only looks blurrier. If you need real enlargement, an AI model can add plausible detail; the guide to AI upscaling explains the options and their limits. This tool allows up to 800% but warns you when you enlarge.

    How the resize works

    The page draws your image onto an HTML canvas at the new size and then encodes the canvas as a file. For big reductions, browsers' one-step scaling can look jagged, so the tool shrinks in steps of at most half, then makes the final step. That is the same idea as mipmapping. It also asks the browser for its highest smoothing setting; see MDN on imageSmoothingQuality. Very large outputs are refused, since browsers limit canvas size and may run out of memory.

    Next steps

    Once the size is right, choose a format with the Image Format Converter, which compares PNG, JPEG and WebP sizes. To flip or rotate a picture, use the Image Mirror and Rotation tool, and to see what metadata a photo carries before you strip it, open the EXIF viewer.

    Common questions

    Why is my resized PNG bigger than the original JPEG? PNG is lossless and stores photographs inefficiently. Pick JPEG or WebP for photos and keep PNG for screenshots and graphics.

    Does the tool keep the photo's rotation? Modern browsers apply the camera's rotation flag when they load the image, so the result is upright. The flag itself is removed.

    Is there a size limit? Output is capped at 16,384 pixels per side and 100 megapixels in total.

    Post a Comment

    0 Comments
    * Please Don't Spam Here. All the Comments are Reviewed by Admin.

    In-Article Ad (Long Posts Only)