Round Image Corners
Open a picture, drag the corner size, save. Corners can be round, squircle or cut, and you can pick which of the four change.
https://flxcode.com/round-image-corners/
or drop it here, or paste with Ctrl+V
JPG, PNG, WebP, HEIC, AVIF, GIF and BMP, up to 25 megapixels. Nothing is uploaded.
Works offline: load this page, edit one picture, turn off Wi-Fi, edit more. A JPG has no see-through areas, so they turn white.
Nothing you open or type is uploaded. How we count What this tool keeps and sends.
Problem or idea? Email us
How to round the corners of a picture
- Choose a picture, or drop or paste one. It stays in this tab.
- Drag Corner size. Try "Avatar circle" for a round profile picture.
- Switch single corners off if you want only the top or only one side rounded.
- Save as PNG to keep the corners see-through. For a JPG pick a colour for outside the corners first.
How a corner is cut
The corner size is a percent of half the shorter side, rounded to whole pixels. At 100% a square picture becomes a circle, a wide one a pill. Only the four r × r corner squares change.
Inside a corner square, u and v are the distances from the point r pixels in from both edges. A pixel stays when |u|^n + |v|^n is at most r^n. With n = 2 that is a circle, with n = 4 a squircle (a superellipse), with n = 1 a straight cut.
An edge pixel is only partly inside, so it is tested at 16 points (4 × 4). The new alpha is the old alpha times the points inside, divided by 16. That is why the edge is smooth and not stair-stepped.
The curve is cut from the picture, so nothing is scaled. The squircle is the plain n = 4 curve, not the continuous curve of any phone maker.
r = round(percent × min(W, H) / 200)
inside |u|^n + |v|^n ≤ r^n n = 2, 4 or 1
alpha = ⌊(alpha × points + 8) / 16⌋ points = 0 to 16
What the corner size means in pixels
Three picture sizes, five settings. Whole pixels, from the same code as the tool.
| Corner size | 1080 × 1080 | 4000 × 3000 | 800 × 600 |
|---|---|---|---|
| 5% | 27 px | 75 px | 15 px |
| 10% | 54 px | 150 px | 30 px |
| 20% | 108 px | 300 px | 60 px |
| 50% | 270 px | 750 px | 150 px |
| 100% | 540 px | 1500 px | 300 px |
The shorter side sets the size, so a wide photo and a square one with the same short side get the same corner.
One corner, pixel by pixel
A white 12 × 12 picture at 100%. Each number is the alpha of one pixel in the top left corner square (255 is solid, 0 is gone). Three curves, same radius of 6.
| Row | Round | Squircle | Cut |
|---|---|---|---|
| row 0 | 0 0 0 112 207 255 | 0 128 207 255 255 255 | 0 0 0 0 0 159 |
| row 1 | 0 16 207 255 255 255 | 128 255 255 255 255 255 | 0 0 0 0 159 255 |
| row 2 | 0 207 255 255 255 255 | 207 255 255 255 255 255 | 0 0 0 159 255 255 |
| row 3 | 112 255 255 255 255 255 | 255 255 255 255 255 255 | 0 0 159 255 255 255 |
| row 4 | 207 255 255 255 255 255 | 255 255 255 255 255 255 | 0 159 255 255 255 255 |
| row 5 | 255 255 255 255 255 255 | 255 255 255 255 255 255 | 159 255 255 255 255 255 |
The squircle keeps more of the corner than the circle, the cut keeps the least.
What this does not do
- The radius is whole pixels. A circle on an odd-sized square can be a hair off true round.
- There is no border or outline. For a frame, add it with another tool before rounding.
- The squircle is n = 4. It is close to what app icons look like but it is not any company's exact shape.
- A JPG cannot be see-through. Choose a colour for outside the corners, or save as PNG.
- Up to 25 megapixels. Picture size does not change, only the corners.
Next: crop to a square first · set the pixel size
FAQ
How do I make a circle profile picture?
Crop the picture to a square first, then press "Avatar circle". On a picture that is not square 100% makes a pill shape, not a circle.
Why are the corners white in my JPG?
A JPG has no see-through part. Save as PNG to keep the corners clear, or pick a colour for outside the corners that matches the page you will put it on.
How do I round only the top corners?
Use "Top corners only", or switch off Bottom left and Bottom right. Each corner is separate.
What does 20% mean in pixels?
Twenty percent of half the shorter side. On a 1080 × 1080 picture that is 108 px. The first table above shows more sizes.
Is the squircle the same as an iPhone icon?
Close, not equal. Here it is the curve with x to the 4th plus y to the 4th. Apple uses a smoother blend, and this page does not copy it.
More from FLXCode
- Crop ImageCrop a photo with drag handles, arrow keys or exact pixels. Presets for 1:1, 4:5 and 16:9. Nothing is uploaded.
- Image ResizerResize photos by pixels, percent or preset for Instagram and email. Batch and zip. Nothing is uploaded.
- Add Shadow to ImageAdd a soft or hard drop shadow to a picture or PNG cut-out. See-through or on a colour. Nothing is uploaded.
- Change Image ColorSwap one colour in a picture, or shift the colours of the whole thing. Nothing is uploaded.