Fit PNG in Rectangle
Fit a PNG into a rectangle online free. Set exact width and height, contain/cover/stretch the image, optional transparent padding — make a rectangle picture or square that is a perfect fit.
Or try an example
Help Us Improve
—
(—)
Center an image online free. Detect content and center horizontally or vertically in the current or a new canvas—perfect for image centering and blank PNG padding.
Content detection
Finds the subject via transparency or a solid key color.
Horizontal & vertical
Center on one axis or both.
Current or new canvas
Keep original dimensions or pad into a larger blank size.
Offset fine-tune
Nudge after centering when visual balance needs a tweak.
PNG download
Export with transparency preserved when you use a transparent background.
Upload your image
Drop a PNG logo, sticker, or photo (15 MB max).
Choose canvas size
Keep the current size or set a new width and height.
Pick centering axes
Enable horizontal and/or vertical centering, then adjust offsets if needed.
Download
Save the centered PNG when the preview looks right.
Prefer transparent PNGs
Alpha-based detection is more accurate than solid-color keying.
Raise tolerance carefully
Too much tolerance on solid backgrounds can eat into soft shadows.
Use offsets for visual weight
Subjects with heavy text on one side may need a few pixels of nudge.
Need a blank canvas first?
Create an empty PNG on /blank-image, then center your subject into that size.
Online PNG Tools (center PNG)
Competitor ranking for “image centering” and “center image”. Similar intent: center content in a PNG with H/V options and optional new size. This page runs fully offline in your browser.
Photoshop / Figma align
Best for multi-layer design systems. Overkill when you only need to center one PNG subject quickly.
CSS / HTML centering
Centers a picture in a webpage layout — does not change the image file. Use this tool when the asset itself must be centered.
This center image tool
Bounding-box centering, current or new canvas, offsets, transparent or solid key, free PNG download. Best for a private center image / image centering workflow.
Logo and icon cleanup
Center a logo inside a square transparent PNG for app stores.
Sticker and emoji packs
Align artwork so every asset shares the same visual center.
Padded social canvases
Place a subject in the middle of a larger blank image for posts or OG cards.
Product cutouts
Recenter a cut-out product photo after background removal.
100% free
No sign-up, no watermarks on the download.
Privacy first
Your image never leaves the browser tab.
Precise geometry
Bounding-box math — not a rough manual crop.
Works with transparency
Ideal for blank PNG padding and logo centering.
“A minimum bounding box is the smallest rectangle that contains a set of points or shapes.”
Bounding box: This center image tool finds the bounding box of non-background pixels, then places that content in the middle of the canvas. en.wikipedia.org/wiki/Minimum_bounding_box
“PNG supports an alpha channel that can store transparency information for each pixel.”
PNG transparency: Transparent PNGs are ideal for image centering: alpha marks empty space so the subject can be recentered without a solid key color. en.wikipedia.org/wiki/PNG
“The CanvasRenderingContext2D.drawImage() method provides different ways to draw an image onto the canvas.”
Canvas drawImage(): After bounds are detected, the content region is cropped and redrawn at the centered coordinates via drawImage. developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage
“Centering things in CSS used to be a tricky business, but now it is simpler with Flexbox and Grid.”
CSS object centering (related): Searches like “how to center picture html” are about layout CSS. This page instead centers pixels inside the image file itself. developer.mozilla.org/en-US/docs/Web/CSS/Layout_cookbook/Center_an_element