About the Gradient Border Generator
The obvious way to make a gradient border, border-image, ignores border-radius — so the corners turn square. This generator uses the reliable two-background trick instead: a solid padding-box layer on top of a gradient border-box layer, which keeps corners perfectly rounded.
Choose a linear or conic gradient, two or three colours, border width and radius, plus a soft glow. For conic borders you also get optional code for a smoothly spinning border using @property, supported by all current browsers.
How to use the Gradient Border Generator
- Choose linear or conic and set width and radius.
- Pick colours, card colour and glow.
- Copy the CSS.
Features
- Rounded corners kept
- Linear or conic
- Optional spin animation
- Glow effect
- Live preview on your page colour
Supported formats
- CSS
Frequently asked questions
Can the border be transparent inside?
This technique needs a solid card colour; for a see-through inside use a mask-based border instead (more complex, less supported).
Is my text sent anywhere?
No. Everything runs in your browser, so nothing you paste is uploaded or stored.
Added · Last reviewed · Maintained by Sohail Khax · How we test tools