Create CSS gradients with live preview - a client-side CSS gradient generator that runs in your browser.
Loading...
Loading...
A CSS gradient generator is a visual tool that helps you create CSS gradient backgrounds without writing code by hand. Instead of guessing angles, positions, and color values, you interact with controls — sliders, color pickers, and presets — and the tool generates the exact CSS code you need. Whether you’re building a landing page hero section, a button hover effect, or a complex multi-layer background, a gradient generator gives you instant visual feedback so you can iterate quickly and get the exact look you want.
DevToolsHub’s Gradient Generator supports all three CSS gradient types — linear, radial, and conic — with full control over angles, positions, and unlimited color stops. You can load preset gradients for inspiration, tweak them to match your design, and copy the CSS in multiple formats. Everything runs in your browser with no server round-trips, so you can work quickly and privately.
A linear gradient transitions colors along a straight line. You control the direction with an angle: 0° goes upward, 90° goes right, 180° goes down, and 270° goes left. Diagonal angles like 135° create a top-left to bottom-right sweep. You can also use directional keywords like to right or to bottom right. Linear gradients are the most commonly used gradient type — perfect for hero sections, buttons, cards, and any element where you want a smooth directional color transition. The CSS syntax is: linear-gradient(135deg, #667eea 0%, #764ba2 100%)
A radial gradient transitions colors radiating outward from a center point. You can choose between a circle shape (equal radius in all directions) or an ellipse shape (stretches to fill the element’s dimensions). You can also position the center anywhere within the element using percentage coordinates. Radial gradients are ideal for spotlight effects, glowing backgrounds, and focus points that draw the eye to a specific area. The CSS syntax is: radial-gradient(circle at 50% 50%, #667eea 0%, #764ba2 100%)
A conic gradient transitions colors around a center point in a circular sweep, like a color wheel or pie chart. You set a starting angle and center position, and the colors transition clockwise from that point. Conic gradients are relatively newer in CSS but are incredibly powerful — they’re perfect for creating pie charts, color wheels, starburst patterns, and unique background effects. Combined with border-radius: 50%, they create striking circular designs. The CSS syntax is: conic-gradient(from 0deg at 50% 50%, #667eea 0%, #764ba2 100%)
background-color: #667eea; background: linear-gradient(...)background: linear-gradient(...), radial-gradient(...)repeating-linear-gradient creates striped and zigzag patterns without images. Define one pattern unit and it tiles automatically.--gradient-start: #667eea; --gradient-end: #764ba2; background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end))Loading...