English 日本語
📐 Pixel & Percentage Scaling • Aspect Ratio Lock • 100% In-Browser

Image Resizer — Change Dimensions Online

Quickly resize PNG, JPG, WebP, SVG, and BMP images by exact pixel width and height or percentage scale. Maintain aspect ratio and export with zero server uploads.

Drop your image here to resize
or click to browse from your device
Supports JPG, PNG, WebP, SVG, BMP • Up to 50 MB • Private in-browser

How to Resize Images Online in 3 Simple Steps

Change image width, height, centimeters, or percentages directly in your browser with zero quality degradation.

1

Upload Image

Select, drag and drop, or paste (Ctrl+V) any JPEG, PNG, WebP, GIF, or BMP image directly into the workbench.

2

Choose Dimensions or Scale

Enter target pixels (px), centimeters (cm), millimeters (mm), or scale by percentage while locking aspect ratio.

3

Download Resized Image

Choose output format (JPG, PNG, or WebP) and quality factor, then immediately save your resized file.

Digital Image Resizing Engineering: Interpolation Mathematics and Spatial Sampling

Image resizing (also referred to as spatial scaling, image resampling, or geometry re-sampling) is one of the foundational operations in computer graphics and digital prepress workflows. Whether adapting a 48-megapixel RAW camera capture for responsive web display, tailoring a passport portrait to rigorous biometric government dimensions, or optimizing e-commerce product catalogs, resizing fundamentally alters the 2D discrete pixel lattice representing an image.

A raster graphic does not contain continuous physical forms; it consists of an addressable orthogonal grid of picture elements (pixels), where each coordinate $(x, y)$ stores quantized color intensity channels (such as 24-bit sRGB or 32-bit RGBA). When an image is transformed to a new width and height, the destination lattice rarely aligns with the original discrete sample points. The resizing engine must calculate novel color values for points that did not exist in the source dataset, requiring continuous interpolation kernels.

Spatial Interpolation Algorithms: Nearest Neighbor, Bilinear, Bicubic, and Lanczos

The mathematical kernel applied during resampling dictates the optical fidelity, edge sharpness, and computational complexity of the output graphic. Four principal algorithms dominate modern digital imaging:

  • Nearest-Neighbor Interpolation (0th-Order):
    The simplest resampling technique assigns each target coordinate the color value of the closest single pixel in the source grid without weighted blending. While computationally trivial ($O(1)$ lookup per pixel), scaling photographs or fine gradients with nearest neighbor produces severe blockiness, jagged aliasing, and broken diagonal lines. However, it remains the gold standard for retro pixel art, icon reproduction, and binary segmentation masks where preserving exact original color palettes and razor-sharp geometric edges is mandatory.
  • Bilinear Filtering (1st-Order):
    Bilinear interpolation samples the $2 \times 2$ neighborhood of four surrounding pixels, executing linear interpolation along the horizontal axis followed by the vertical axis. The resulting value represents a smooth linear distance-weighted blend:
    f(x, y) ≈ (1 - α)(1 - β)P0,0 + α(1 - β)P1,0 + (1 - α)βP0,1 + αβP1,1
    Bilinear filtering eliminates staircase pixelation, making it standard for real-time GPU texture sampling, though it introduces mild optical blurring along sharp edges.
  • Bicubic Resampling (3rd-Order Splines):
    Bicubic filtering samples a $4 \times 4$ cluster of 16 neighboring pixels, utilizing cubic polynomial convolution kernels (such as Catmull-Rom or Mitchell-Netravali splines). By taking into account the rate of surface curvature change, bicubic interpolation preserves crisp high-frequency edges while generating exceptionally smooth color gradients, making it the preferred default in photo editing software.
  • Lanczos Windowed Sinc Resampling:
    Lanczos filtering computes a windowed sinc kernel across a larger support radius (typically Lanczos-2 or Lanczos-3 with 36 surrounding pixels):
    L(x) = sinc(x) × sinc(x / a)  for  |x| < a, where sinc(t) = sin(πt) / (πt)
    Lanczos resampling achieves the highest theoretical reconstruction fidelity for complex, high-detail photographic downsizing and upsizing, preventing loss of fine textures like hair, textiles, and distant typography.

HTML5 Canvas Downsampling: The Mipmapping & Stepwise Scaling Pipeline

When downscaling large multi-megapixel photographs (e.g., downsizing a 6000 × 4000 DSLR image to an 800 × 533 blog thumbnail) in a web browser, standard single-pass canvas drawImage() rendering can introduce noticeable moiré patterns, shimmering artifacts, and ringing along high-contrast lines. This occurs because the hardware bilinear sampler skips massive swaths of original pixel data.

Our tool mitigates this by applying an intelligent Stepwise Multi-Pass Downsampling (Mipmap) technique. The image is scaled down iteratively in halving increments (50% reduction per pass) onto temporary offscreen canvas contexts until the target dimension is approached, followed by a final fractional bicubic scale. This guarantees that all original high-frequency luminance data contributes to the final antialiased output, producing pristine, crisp thumbnails without pixel shimmer.

Physical Dimensions vs. Pixels: Mastering DPI, CM, MM, and Inches

A frequent point of confusion is the relationship between digital pixel dimensions ($W \times H$) and real-world physical measurements (centimeters, millimeters, or inches) required for passport photos, framing, business cards, and print submissions. Digital image files possess no physical size on disk; physical dimensions are only realized when coupled with a specific Dots Per Inch (DPI) or Pixels Per Inch (PPI) density metric:

Pixels (px) = (Millimeters / 25.4) × DPI
Pixels (px) = (Centimeters / 2.54) × DPI
Pixels (px) = Inches × DPI

For example, standard biometric passport photos measure $35\text{ mm} \times 45\text{ mm}$. When printed at commercial photographic quality (300 DPI):

Width = (35 / 25.4) × 300 ≈ 413 pixels
Height = (45 / 25.4) × 300 ≈ 531 pixels

Our online resizer features dedicated input modes for Centimeters (cm), Millimeters (mm), Inches (in), and Pixels (px), accompanied by an adjustable DPI selector (72 DPI for web screens, 150 DPI for desktop printing, 300 DPI for commercial offset prepress) that handles all unit conversions instantaneously.

Resampling Algorithm Comparison Matrix

Algorithm Sample Support Computational Cost Edge Sharpness Ideal Use Cases
Nearest Neighbor 1 pixel (1 × 1) Extremely Low (O(1)) Harsh, aliased Pixel art, retro game sprites, UI icons, segmentation masks
Bilinear 4 pixels (2 × 2) Low Moderate smoothing Fast web previews, real-time GPU scaling, mild downscaling
Bicubic 16 pixels (4 × 4) Moderate Smooth with edge preservation General digital photography, web banners, portrait retouching
Lanczos-3 36 pixels (6 × 6) High Maximum high-frequency fidelity Print prepress, architectural schematics, fine textile textures

Aspect Ratio Locking: Avoiding Distorted Proportions

An image's aspect ratio defines the proportional relationship between its horizontal width and vertical height ($W / H$). Scaling width and height independently without maintaining aspect ratio results in unnatural anamorphic stretching, causing people to appear unnaturally wide or narrow and turning circular elements into ellipses.

By default, our tool's Lock Aspect Ratio toggle is enabled. Modifying the width automatically updates the height according to the mathematical ratio:

Heightnew = Math.round(Widthnew × (Heightorig / Widthorig))

When arbitrary framing is required (such as fitting an image into an exact fixed banner slot without distortion), use our integrated Image Cropper before resizing to prevent subject skewing.

Privacy & Security: 100% Client-Side In-Browser Memory Processing

Every image resize calculation, downsampling pass, unit conversion, and format re-encoding executes entirely inside your client browser using HTML5 Canvas APIs, Web Workers, and JavaScript binary arrays. Your photos, private personal portraits, and confidential graphic designs are never uploaded to remote servers or cloud storage. This architecture delivers zero network latency, instant downloads, and uncompromising data privacy.

Frequently Asked Questions

Practical answers to common questions about resizing images in pixels, centimeters, and print dimensions.

How do I resize an image to specific dimensions in centimeters (cm) or inches?
In the tool settings above, switch the unit selector from Pixels (px) to Centimeters (cm) or Inches (in). Enter your desired physical measurements and select the target print resolution (DPI). The tool automatically calculates the exact pixel count required using the formula: Pixels = (Centimeters / 2.54) × DPI, ensuring your resized photo matches official physical print standards.
What is the difference between image resizing and image cropping?
Resizing changes the total resolution (number of pixels) and file dimensions of the entire image while keeping all visual elements intact. Cropping, on the other hand, cuts away external borders or unwanted background areas to change the framing or aspect ratio without altering the scale of the retained content.
Will resizing a small image to a larger size make it blurry?
Yes. Upscaling (enlarging) an image requires interpolating new pixels that did not exist in the original data. While bicubic resampling smoothes pixel boundaries to avoid jagged blocks, upscaling significantly beyond 150–200% of the native resolution inevitably leads to soft, slightly blurry results due to lack of optical detail in the source image.
How does aspect ratio locking work during dimension adjustments?
When the lock icon is enabled, entering a new width automatically calculates and fills the corresponding height proportionally (and vice versa) based on the original width-to-height ratio. This prevents facial features, products, or landscapes from appearing stretched, squashed, or visually deformed.
Why does my resized image look jagged or blurry when downscaled significantly?
Downscaling high-resolution photos in a single pass can cause moiré patterns and aliasing because large clusters of source pixels are skipped. Our engine applies multi-step mipmapping, progressively halving dimensions in multiple passes before rendering the final size, ensuring sharp, antialiased edges and balanced micro-contrast.
What is the difference between pixels, DPI, and physical print size?
Pixels represent the absolute digital dimensions of the file on your screen (e.g., 1920 × 1080 px). DPI (Dots Per Inch) determines how tightly those pixels are packed together when transferred onto physical paper. An image measuring 1200 × 1800 px printed at 300 DPI yields a crisp 4 × 6 inch print; printed at 150 DPI, it yields an 8 × 12 inch print with lower dot density.
Are my uploaded private photos stored or transmitted to external servers?
No. All resampling, canvas calculations, and format conversions occur 100% locally within your device's web browser using HTML5 Canvas and JavaScript. No files, image data, or personal details are uploaded to our servers or stored anywhere in the cloud, guaranteeing complete confidentiality.
What image formats can be resized using this tool?
You can upload and resize JPEG (JPG), PNG (including transparent graphics), WebP, GIF (static), BMP, and SVG files. Output files can be exported directly into JPG, PNG, or modern WebP format with custom compression quality settings.