Skip to content
UniKit

Image rounded corners

Round the corners of a square-cornered image (up to a full circle), pick the radius as a percentage and fill the outside with transparency or a solid colour before exporting PNG/JPEG.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

Images are processed locally in your browser with Canvas and never uploaded.

10%

Leave blank or use transparent for an alpha background, or enter #ffffff.

Pick an image first (PNG / JPEG / WebP / GIF all work).

Result details

Result details

Pick an image and the rounded preview shows up immediately.

What this tool does

  • Round the corners of card, button or avatar artwork: 10%–25% is the usual "soft" range, and the cut corners stay transparent.
  • Make a perfect circle in one step: set the radius to 50% and the output is the inscribed circle.
  • Give the corners a solid backdrop: fill the outside with #ffffff or a brand colour so a JPEG export has no black edges.
  • Verify the effective radius before exporting: the result card reports the radius in pixels and how many pixels the mask replaced.

Example

Input

Opaque 4 × 4 image, corner radius 50%, fill left blank

Output

Output size 4 × 4 (16 pixels)
Corner radius 2 px, 4 masked pixels

This is the real output of the pure pixel logic: radius = min(4, 4) / 2 × (50 / 50) = 2, and the corner pixel centres sit 2√2 ≈ 2.83 away from the inset rectangle, so they are cleared.

Frequently asked questions

Why are the rounded edges slightly jagged?

The test keeps a pixel when its centre is inside the arc, with no antialiasing. That makes the output identical pixel-for-pixel across browsers and device pixel ratios, which the unit tests rely on. Process at 2–4× the size and downscale for smooth edges.

What is the difference between a blank and a coloured corner fill?

Blank (or "transparent") sets the corner alpha to 0, which needs a PNG export to survive. A colour such as #ffffff gives an opaque fill, so a JPEG export has no black edges.

Does a 50% radius produce a full circle?

Yes. The radius is based on the shorter edge, so 50% is half of it; on a non-square image that yields a capsule shape. For a true circle, crop to a square first.

How large can the image be?

Up to 8,000,000 pixels per image (for example 4000 × 2000). Larger images report an explicit dimension error instead of freezing the tab.

Keywords:rounded cornersborder radius

Related tools