WhatsApp Button Generator for Website
Create a Chat on WhatsApp button for your site without touching CSS. Choose solid, outline, pill or dark styles, set your number and prefilled message, then copy one line of pure HTML. No scripts, no dependencies, nothing to maintain.
How to use WhatsApp Button Generator for Website
- 1 Set number and label Enter your WhatsApp number with country code and the button text you want.
- 2 Pick a style Solid, outline, pill or dark, in three sizes, with any accent color.
- 3 Copy the HTML The preview updates live. Copy the snippet and paste it anywhere HTML is allowed.
A WhatsApp chat button you can paste into any website
Most people who land on your site with a question never fill out a contact form. They want to ask something quickly and get a reply on an app they already keep open all day. A WhatsApp button solves that. This tool builds a ready-to-use click-to-chat button for your website, generates the HTML you can copy, and lets you preview exactly how it will look before you ship it. You type in your WhatsApp number, choose a style, optionally write a message that gets pre-filled for the visitor, and the tool hands you clean code. Nothing is uploaded anywhere. The generation happens in your browser, so your number and your draft message never leave your device.
It is built for small business owners, freelancers, agencies, e-commerce stores, and developers who want a fast contact channel without wiring up a chat widget, a plugin subscription, or a third-party script that slows the page down. If you can paste a snippet into your theme, a landing page builder, or a block in your CMS, you can add a working WhatsApp button in a couple of minutes.
How the WhatsApp button generator actually works
Under the hood, the button is just a link that points to WhatsApp’s official click-to-chat endpoint. WhatsApp supports two URL formats that do the same job: https://wa.me/<number> and https://api.whatsapp.com/send?phone=<number>. When someone taps that link, WhatsApp opens a fresh conversation with your account, either in the mobile app or in WhatsApp Web on desktop. No API key, no Business API account, and no backend are required for this. It works with a normal personal or WhatsApp Business app number.
The single most important detail is the number format. A wa.me link needs the phone number in full international format with the country code, and with no plus sign, no spaces, no dashes, and no leading zeros. A UK number written locally as 07123 456789 becomes 447123456789. A US number like (415) 555 0132 becomes 14155550132. The tool strips out the characters that break the link and keeps the digits, but you still have to include the correct country code yourself, because a bare local number will either fail or route to the wrong country.
Pre-filling the first message
You can attach a starter message so the visitor’s chat box opens with text already typed, ready to send. That is done with the text parameter, for example https://wa.me/447123456789?text=Hi%2C%20I%20have%20a%20question%20about%20your%20pricing. The message has to be URL-encoded, which is why spaces show up as %20 and punctuation gets escaped. You do not need to encode anything by hand. Type the sentence you want in plain language and the tool encodes it into a valid link. This pre-fill is a genuinely useful nudge, because it removes the blank-page hesitation and often tells you which page the person came from if you word it well.
What the generated code contains
The output is a standard HTML anchor, styled inline so it does not depend on your stylesheet. You get options for an inline button that sits inside your content and a floating button that stays fixed in a corner of the screen as the visitor scrolls. The link uses target="_blank" and rel="noopener" so it opens WhatsApp in a new tab without exposing your page. Because it is plain HTML, it works in WordPress (Custom HTML block), Shopify, Wix, Squarespace, Webflow, plain static sites, and email signatures that allow links.
Real ways people use a WhatsApp button
A local service business (a plumber, a dentist, a driving instructor) puts a floating button on every page so a visitor can ask about availability without hunting for a phone number. An online store adds an inline button on the product page with a pre-filled message such as “Is the navy hoodie in size M back in stock?” so the shopper does not have to describe the item from scratch. A freelancer drops the button under their portfolio with the text “I saw your work and want to discuss a project.” A restaurant links it to take booking enquiries. An agency uses one button per landing page, each with a different pre-filled message, so incoming chats tell them which campaign drove the conversation.
The button also pairs well with the rest of your WhatsApp presence. The same wa.me link can go in your Instagram bio, your Google Business Profile, a QR code on a flyer, or your WhatsApp group’s welcome message. It is the same click-to-chat mechanism everywhere, so once you have the link, you can reuse it far beyond the website.
Best practices for a button people actually tap
Keep the label honest and specific. “Chat with us on WhatsApp” outperforms a vague “Contact” because the visitor knows which app opens and roughly how fast they will hear back. If you only staff WhatsApp during business hours, say so nearby, so nobody feels ignored at midnight. Place a floating button on the side that does not cover your other calls to action, and give it enough padding that it is easy to tap on a phone. For a pre-filled message, write it from the visitor’s point of view and mention the page or product, which saves everyone a round of back-and-forth. Use a WhatsApp Business number if you can, since it lets you set an away message, a greeting, and business hours that make the first reply feel handled even when you are busy.
Common mistakes and how to avoid them
The mistake that trips up almost everyone is the number format. Leaving the leading zero in place (like 07123…) or including a plus sign or spaces produces a link that either errors out or does nothing. Always convert to country code plus national number, digits only. A second common error is assuming WhatsApp lets you send a message automatically. It does not, and it should not. The pre-filled text only populates the input box, and the visitor still presses send, which is exactly how it protects people from spam. Do not promise “instant” replies unless you can staff it. Finally, avoid stuffing a long paragraph into the pre-filled message. A single clear sentence works; a wall of text looks like a script and gets deleted before it is sent.
Troubleshooting
If tapping the button shows “phone number shared via url is invalid”, the number is almost always the culprit. Recheck that it starts with the country code and has no zeros, symbols, or spaces. If WhatsApp opens but starts a chat with the wrong account, you likely have the wrong or a missing country code, so a local number is being interpreted against the visitor’s own region. If the pre-filled message appears garbled with stray characters, the text was double-encoded somewhere, so re-generate it from plain text rather than pasting an already-encoded string. When the button opens WhatsApp but reports the number is not on WhatsApp, confirm that the number actually has an active WhatsApp or WhatsApp Business account, because click-to-chat only reaches numbers that are registered. On desktop, if nothing happens, the visitor may not have WhatsApp Web set up or logged in, which is a limitation of their device, not the link. And if the button does not appear at all after pasting, check that your page builder did not strip the HTML; some editors sanitise raw markup, in which case use a dedicated Custom HTML or Embed block.
One reassurance worth repeating: this tool never contacts WhatsApp on your behalf and never stores your number. It only assembles a link and a snippet of markup, so anything you type stays in your browser tab.
Key features
Click-to-chat link built in
Generates a proper wa.me link so tapping the button opens a fresh WhatsApp chat with your number, with no API or backend needed.
Pre-filled first message
Add a starter sentence that appears in the visitor's chat box already typed, URL-encoded correctly so it never arrives garbled.
Inline or floating style
Choose a button that sits inside your content or one that stays fixed in a screen corner as the visitor scrolls.
Copy-ready HTML
Outputs clean, self-styled anchor code you can paste into WordPress, Shopify, Wix, Webflow, or a plain static page.
Why people use it
- More conversations, fewer forms Visitors reach you on an app they already use instead of abandoning a contact form, so more questions actually reach your inbox.
- Live in minutes Enter your number, preview the button, and paste one snippet, with no plugin subscription or chat widget script to slow your page.
- Private by design The link is assembled entirely in your browser, so your WhatsApp number and draft message are never uploaded or stored.
Frequently asked questions
How do I add a WhatsApp button to my website?
Enter your number in full international format, optionally write a pre-filled message, pick an inline or floating style, then copy the generated HTML and paste it into a Custom HTML block, your theme, or your landing page. The button links to WhatsApp's click-to-chat page, so it works without any API.
What number format does a wa.me link need?
Use the country code followed by the national number with digits only. Remove the plus sign, spaces, dashes, and any leading zero. For example a UK 07123 456789 becomes 447123456789 and a US (415) 555-0132 becomes 14155550132.
Can the button send the message automatically?
No, and that is intentional. WhatsApp only pre-fills the text in the visitor's chat box, and they still tap send themselves. This protects people from unsolicited messages, so you cannot dispatch a message without their action.
Do I need the WhatsApp Business API for this?
No. The button uses WhatsApp's free click-to-chat links, which work with a normal personal number or the WhatsApp Business app. The full Business API is only needed for automated, large-scale messaging systems, not for a simple chat button.
Does the floating button work on mobile and desktop?
Yes. On a phone it opens the WhatsApp app, and on a computer it opens WhatsApp Web or the desktop app, provided the visitor is logged in there. The floating option stays pinned in a corner as the page scrolls on both.
Is my WhatsApp number kept private?
Yes. The tool builds the link and HTML entirely in your browser and uploads nothing. Your number and pre-filled message stay on your device; once you paste the button on your public page, only the number you chose is visible in that link.
Privacy & security
This tool runs entirely in your browser and assembles the WhatsApp button link and HTML locally on your device. Your phone number and any pre-filled message are never uploaded, logged, or stored on a server. Once you place the generated button on your own public page, the WhatsApp number in that link is visible to visitors, which is exactly what lets them start a chat.
Sources
Your WhatsApp bestie has more tricks
Message packs, fancy text, symbols, links and QR codes. Every tool runs in your browser, free, no sign-up.
Explore all 389 tools