Skip to tool content

Gradient Border Generator

Create CSS gradient borders with live preview and code output.

Try the Gradient Border Generator

Create CSS gradient borders with live preview and code output.

#css#gradient#border#generate

Gradient Border Preview

Customize the gradient, width, and radius

135°
3px
12px
Result

CSS

.gradient-border {
  position: relative;
  background: hsl(0 0% 100%);
  border-radius: 12px;
  padding: 1rem;
}

.gradient-border::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  padding: 3px;
  background: linear-gradient(135deg, #6366f1, #06b6d4);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

MD. Mohi Minul Islam Yash

Full-Stack Software Engineer

© 2026 MD. Mohi Minul Islam Yash. All rights reserved.