Rounded Corners on Images: CSS border-radius vs Baked-In Transparent Corners
Rounded corners soften images and help them match the rounded cards and buttons of modern interfaces. There are two ways to get them: round the corners in CSS when the image is displayed, or bake the rounding into the image file itself. Each has clear advantages, and choosing the wrong one creates extra work.
Option 1: CSS border-radius
img.rounded { border-radius: 16px; }
img.avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; }The image file stays a normal rectangle. The browser clips its corners at display time.
Advantages:
- The original file is reused everywhere; you can change the radius site-wide with one line.
- Works with responsive sizes; the radius stays consistent as the image scales.
- No re-exporting when the design changes.
- Combined with
object-fit: cover, any rectangular photo becomes a neat circle avatar.
Option 2: corners baked into the file
The image is exported with its corners already rounded, usually with transparent pixels outside the curve.
Advantages:
- Works anywhere, including places that don’t run your CSS: emails, presentations, documents, social media, app stores, chat apps and marketplaces.
- The look is guaranteed regardless of where the file ends up.
The rounded corners tool above creates these files, with optional borders and a circle crop.
CSS radius versus baked-in corners
| Aspect | CSS border-radius | Baked-in corners |
|---|---|---|
| Editable later | Yes, instantly | No, re-export needed |
| File format requirement | Any | PNG or WebP for transparency (JPG needs a solid corner color) |
| Works in email and documents | Unreliable in email; not applicable to documents | Yes |
| Works on social media | No | Yes (though some platforms crop images their own way) |
| Consistent radius at all sizes | Yes | No, the radius scales with the image |
| File size | Unchanged | PNG may be larger than the original JPEG |
The rule of thumb: on your own website, use CSS. Everywhere else, bake it in.
Transparency and file formats
Rounded corners need something outside the curve. In formats with an alpha channel (PNG, WebP, AVIF), those pixels can be fully transparent, so the image sits cleanly on any background.
JPEG has no transparency. Corners must be filled with a solid color, which only looks right if it matches the background where the image will be placed. That’s fine for a white document or a slide with a known background color, but not for unpredictable places like social feeds that switch between light and dark mode.
Converting a photo from JPEG to PNG to get transparent corners can increase the file size several times, because PNG compresses photos poorly. Lossy WebP with transparency is the best of both worlds where it’s supported. For a deeper comparison, see JPG vs PNG vs WebP vs AVIF.
The radius scales with the image
A baked-in 24px radius on a 1200px image becomes a 6px radius when that image is displayed at 300px. If the image will be shown at a different size than you export it, choose the radius relative to the display size, or define it as a percentage of the image (our tool uses a percentage of the shorter side for this reason).
CSS radii in pixels stay the same size no matter how large the image is displayed, which keeps them consistent with buttons and cards.
Circles and avatars
For profile pictures:
- Start with a square image, with the face centered and some space around it.
- On your site, use CSS:
border-radius: 50%on a square element. - For uploads to platforms, most of them already display avatars as circles, so upload a square image. Pre-cropping to a circle with transparent corners can look odd on platforms that place a circle over a square anyway.
- For documents and email signatures, a baked-in circle PNG with transparent corners looks neat.
Borders
A thin border around a rounded image helps it stand out on a background of a similar color, for example a white screenshot on a white page. In CSS, add border: 1px solid #e5e5e5 or an inset box-shadow. When baking it in, make sure the inner corner radius is slightly smaller than the outer radius by the border width, or the border looks uneven at the corners. This is the same nested-radius rule explained in our border radius guide.
Rounded screenshots for presentations
Rounded screenshots look polished in slide decks and marketing material. Tips:
- Add a subtle shadow so the screenshot lifts off the slide (most slide tools can do this).
- Use a consistent radius across all screenshots in the deck.
- Export PNG to keep text sharp.
- Match the corner background to the slide color if you export JPEG.
Email and office documents in practice
Email is where the CSS approach most often breaks. Classic Outlook for Windows renders HTML email with Microsoft Word’s layout engine, which ignores border-radius entirely, so CSS-rounded images show up as plain rectangles for those readers. Many other clients support it, but email designers usually bake corners into the image to get the same result everywhere.
Word processors and slide tools are similar. They can apply rounded picture styles, but the effect depends on the application and often disappears when the file is exported or opened elsewhere. A PNG with transparent corners looks the same in Word, Google Docs, Keynote, PowerPoint and a PDF.
| Destination | Recommended approach |
|---|---|
| Your website or web app | CSS border-radius |
| HTML email newsletters | Baked-in corners (PNG, or JPEG on a matching background) |
| Slides and documents | Baked-in PNG with transparent corners |
| Social media posts | Usually leave square; platforms apply their own framing |
| App store screenshots | Follow the store’s guidelines; most expect full rectangles |