Skip to content
Free Tool Arena

Developer Utilities · Free tool

CSS Button Generator

Visual CSS button generator. Hover, active, and focus-visible states baked in. Tunable colors and sizing.

Updated May 2026
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0f766e;
  color: #ffffff;
  border: 0;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  transition: filter 0.15s ease, transform 0.15s ease;
}
.btn:hover {
  filter: brightness(0.9);
}
.btn:active {
  transform: translateY(0);
}
.btn:focus-visible {
  outline: 2px solid #0f766e;
  outline-offset: 2px;
}
Found this useful?Email

Advertisement

What it does

Visual CSS button generator with hover, active, and focus-visible states baked in. Tunable colors, padding, radius, font, shadow, and hover behavior.

Embed this tool on your siteShow snippet

Paste this snippet into any page. Loads on-demand (lazy), no tracking scripts, and sized to most dashboards. Replace the height to fit your layout.

<iframe src="https://freetoolarena.com/embed/css-button-generator" width="100%" height="720" frameborder="0" loading="lazy" title="CSS Button Generator" style="border:1px solid #e2e8f0;border-radius:12px;max-width:720px;"></iframe>
Embed docs →

How to use it

  1. Customize colors, sizing, weight, hover effect.
  2. Copy the .btn class and use on any &lt;button&gt; or anchor.

Frequently asked questions

Why include focus-visible?
Keyboard users need a visible focus indicator. focus-visible (vs focus) only shows the ring on keyboard nav, not on mouse click — best of both UX worlds.

Advertisement

Learn more

Explore more developer utilities tools

100% in-browserNo downloadsNo sign-upMalware-freeHow we keep this safe →