How to use the CSS Button Generator
- Set the text, colours and shape.
- Adjust padding, font, shadow and hover effect — hover the preview to test it.
- Copy the CSS and HTML into your project.
What does this tool do?
Buttons are the most-clicked element on most sites, so they deserve care: enough padding to tap on a phone, strong colour contrast and a clear hover and focus state.
The generated CSS includes a visible :focus-visible outline so keyboard users can see where they are.
Why use it?
- Live hover preview.
- Gradients and borders.
- Accessible focus style included.
Privacy
The calculation happens instantly in your browser. The numbers you enter are not sent to our servers or saved. There's no account to create and nothing to install.
Last reviewed by the M2Toolkit team.