Skip to content
fixyour.page

CTA Button Generator

Generate CSS button code with live preview and customization.

Your data stays in your browser
Colors
Size
Border radius — 4px
Font weight
Hover effect

Hover effects work in web browsers only. Gmail, Outlook, and Apple Mail strip inline event handlers — in email, the button stays in its base state.

Output mode
Get StartedHover to preview effect
Generated Code
<class="text-orange">a href="https://example.com" style="display: inline-block; padding: 12px 20px; font-size: 16px; font-weight: 700; font-family: sans-serif; color: #FFFFFF; background-color: #FF6B00; border: 2px solid #FF6B00; border-radius: 4px; text-decoration: none; text-align: center; line-height: 1; cursor: pointer; transition: all 0.2s ease"
   onmouseover="this.style.cssText='display: inline-block; padding: 12px 20px; font-size: 16px; font-weight: 700; font-family: sans-serif; color: #FFFFFF; background-color: #FF6B00; border: 2px solid #FF6B00; border-radius: 4px; text-decoration: none; text-align: center; line-height: 1; cursor: pointer; transition: all 0.2s ease; filter: brightness(0.85)'"
   onmouseout="this.style.cssText='display: inline-block; padding: 12px 20px; font-size: 16px; font-weight: 700; font-family: sans-serif; color: #FFFFFF; background-color: #FF6B00; border: 2px solid #FF6B00; border-radius: 4px; text-decoration: none; text-align: center; line-height: 1; cursor: pointer; transition: all 0.2s ease'">Get Started<class="text-orange">/a>

How to Create a CTA Button

Pick your colors, set the size, adjust the border radius, and choose a hover effect. The preview updates instantly so you can see exactly what your button looks like before you copy the code. When you're happy with it, hit Copy or Download to grab the generated HTML. Use Inline Styles mode for email campaigns and embedded snippets, or CSS Class mode for websites where you want a reusable style.

What Makes a Good CTA Button?

High contrast between the button and its surroundings. Action-oriented text that tells people what happens when they click — "Start Free Trial" beats "Submit" every time. Size matters: the button needs to be large enough to tap on mobile (at least 44px touch target), but not so large it looks desperate. A subtle hover effect builds perceived interactivity and tells users the element is clickable. And whitespace around the button is just as important as the button itself — crowded buttons get ignored.

Inline Styles vs. CSS Classes

Use inline styles when you can't control the stylesheet — email HTML, embedded widgets, CMS snippets with restricted editing. Email clients like Gmail and Outlook strip out style blocks, so inline is your only option. The trade-off: hover effects require onmouseover/onmouseout attributes, which some email clients ignore. Use CSS class mode for websites and landing pages where you can include a style block. You get cleaner HTML, proper hover support, and a class you can reuse across multiple buttons.

Can I use this button in email campaigns? +
Yes — use Inline Styles mode. Email clients strip style blocks, so all your styling needs to be on the element itself. The hover effect uses onmouseover attributes, which work in webmail but get ignored in some desktop clients like Outlook. Make sure your button looks good in its default state since that's what everyone sees.
What border radius should I use? +
It depends on your brand. Zero pixels gives you sharp, industrial corners. Four to eight pixels is the web standard — subtle rounding that softens the edges. Fifty pixels creates a pill-shaped button. Rounded buttons tend to test well in A/B experiments, but brand consistency matters more than marginal conversion differences.
Does the hover effect work on mobile? +
Hover effects require a cursor, so they don't apply on touchscreens. The button still looks and works fine — mobile users see the default state. Focus on making the base state compelling on its own. The hover effect is a bonus for desktop users, not a requirement.
What colors should I use for my CTA button? +
High contrast between the button background and the page behind it. White text on a bold background color is the safest bet. The text color needs at least a 4.5:1 contrast ratio against the background to meet WCAG accessibility standards. Orange on white pages is a classic high-conversion combination. Avoid low-contrast combos like light gray on white — nobody clicks what they can't see.