CSS Button Generator
Build a button and copy its CSS. Choose a solid or gradient background, set padding, radius, font, border and shadow, then pick a hover effect. A live button shows the result as you edit.
This CSS button generator builds a styled button and hands you the full CSS, including the hover state. Switch the background between a solid colour and a gradient, set the text colour, padding, radius, font and border, add a shadow, then pick how it reacts on hover. As a button styling tool it updates a real, clickable button next to the code so you can see every change land. Use it as a quick css button maker or a gradient button generator, all in your browser.
.button {
background: linear-gradient(120deg, #6d28d9, #0ea5e9);
color: #ffffff;
padding: 14px 28px;
border-radius: 10px;
font-size: 16px;
font-weight: 600;
border: none;
cursor: pointer;
transition: all 0.2s ease;
box-shadow: 0 6px 16px -4px rgba(15, 30, 55, 0.35);
}
.button:hover {
transform: translateY(-2px);
box-shadow: 0 12px 22px -6px rgba(15, 30, 55, 0.45);
}How it works
- 1
Pick a background
Choose solid or gradient. For a gradient button generator, set two colours and the angle.
- 2
Shape the button
Set padding, radius, font size and weight, and a border if you want one, then toggle the shadow.
- 3
Copy the CSS
Choose a hover effect, then copy the full rule, hover state included, and paste it into your stylesheet.
Instant & 100% private — nothing is uploaded
Everything runs locally in your browser. Your code, text and files are processed on your own device and are never sent to a server — so there are no upload waits, no size limits from us, and nothing is ever stored or logged.
Frequently asked questions
- What does this CSS button generator output?
- A single CSS rule for your button plus a matching :hover rule. You paste it into your stylesheet and add the class to a button or a link element.
- How do I make a gradient button?
- Set the background to Gradient, choose the two stop colours and the angle, and the gradient button generator writes a linear-gradient background for you.
- Can I change what happens on hover?
- Yes. Pick Darken, Lighten or Lift, and the button styling tool adds the right :hover rule — a colour shift or a small upward nudge with a stronger shadow.
- Does it work on links, not just buttons?
- Yes. The class works on any element. On an anchor tag you may want to add text-decoration: none, but the padding, colours and radius all apply the same way.
- Why use a css button maker instead of copying from a framework?
- You get exactly the styles you set, with no framework classes or resets to untangle. It’s a small, readable rule you own and can edit by hand later.
More tools
More from the Hivly network
Free sister tools on our other sites.