How to Add a WhatsApp Chat Button to Your Website (2026)
A step-by-step 2026 guide to adding a WhatsApp chat button to any website — wa.me link buttons, floating widgets, WordPress, Shopify and Wix methods, prefilled messages, placement and click tracking.
Key Takeaways
- A WhatsApp chat button is just a wa.me/<number> link — number in full international form, no plus sign or spaces.
- Add ?text= with a URL-encoded prefilled message to open the chat with text ready to send.
- Use an inline styled button for specific pages, or a fixed-position floating widget for site-wide reach.
- WordPress, Shopify and Wix each offer a plugin/app route and a theme-code route — both work.
- The inbound button is free; sending broadcasts needs the API and a platform like PayPerWA at ₹0.20/msg + Meta's charge.
The quick answer: how a WhatsApp chat button actually works
The methods at a glance
| Method | Best for | Effort | Floating widget? |
|---|---|---|---|
| Plain wa.me link / styled button | Any HTML site, full control | Low | No (inline) |
| Hand-coded floating widget | Developers, custom sites | Medium | Yes |
| WordPress plugin | WordPress / WooCommerce | Low | Yes |
| Shopify app or theme code | Shopify stores | Low–Medium | Yes |
| Wix button element | Wix sites | Low | Optional |
| Free widget generator | Non-technical users | Low | Yes |
No subscription. ₹0.20/msg + Meta's rate (or $0.004/msg on USD wallets).
Create free account →Method 1: Add a simple wa.me link button (any website)
- Build your link. Take your number, remove the plus sign and any spaces: 919876543210. Your base link is https://wa.me/919876543210.
- Add a prefilled message (optional). Append ?text= followed by a URL-encoded message. "Hi, I have a question" becomes ?text=Hi%2C%20I%20have%20a%20question. Most link builders encode this for you automatically.
- Wrap it in a button. Paste this where you want the button to appear:
<a href='https://wa.me/919876543210?text=Hi%2C%20I%20have%20a%20question' target='_blank' rel='noopener' style='display:inline-block;background:#25D366;color:#fff; padding:12px 20px;border-radius:8px;text-decoration:none; font-weight:600;'>Chat on WhatsApp</a>
- Use the brand colour. WhatsApp green is #25D366. Pair it with white text and the WhatsApp glyph so visitors recognise it instantly.
- Test on mobile and desktop. On a phone it should open the app; on a laptop it should open WhatsApp Web. Always set target='_blank' so you do not navigate the visitor away from your page.
Method 2: Add a floating WhatsApp widget by hand
- Create a fixed-position container. Add this snippet just before the closing </body> tag of your site template so it loads on every page:
<a href='https://wa.me/919876543210?text=Hi%21%20I%20need%20help' target='_blank' rel='noopener' style='position:fixed;bottom:20px;right:20px;z-index:9999; width:56px;height:56px;border-radius:50%;background:#25D366; display:flex;align-items:center;justify-content:center; box-shadow:0 4px 12px rgba(0,0,0,0.15);' aria-label='Chat on WhatsApp'> <img src='/whatsapp-icon.svg' alt='WhatsApp' width='30' height='30'> </a>
- Position it sensibly. Bottom-right is the convention. Keep at least 20px of margin so it does not collide with cookie banners or back-to-top buttons.
- Add an aria-label. Screen readers and accessibility audits expect a text label on an icon-only button.
- Avoid overlap. If you already have a live-chat bubble, do not stack two floating buttons — pick one primary channel.
Method 3: WordPress (and WooCommerce)
- Plugin route (easiest). From your WordPress dashboard go to Plugins, Add New, and search for a "WhatsApp chat button" plugin. Install and activate one, then open its settings to enter your number, a prefilled message and the position (bottom-left or bottom-right). Save and it appears site-wide instantly.
- Block / shortcode route. If you only want a button on one page, edit that page, add a Button block, and set the link to your wa.me URL. Style it green.
- Theme-code route. For full control, paste the floating-widget snippet from Method 2 into your theme's footer.php (use a child theme so updates do not overwrite it) or a "custom HTML / footer scripts" box if your theme provides one.
- WooCommerce tip. Put a "Ask about this product on WhatsApp" button on the product page with a prefilled message that includes the product name, so you instantly know what the customer is asking about.
Method 4: Shopify
- App route. Open the Shopify App Store from your admin, search for a WhatsApp chat button app, install it, and configure your number, greeting and position. Most add a floating widget across the whole storefront with no code.
- Theme-code route. In your admin go to Online Store, Themes, then Edit code. Open theme.liquid and paste the floating-widget snippet from Method 2 just before </body>. It now shows on every page including product, cart and checkout-adjacent pages.
- Product-page button. To add an inline button on the product template, edit the product section and insert the styled wa.me link near the Add to Cart area. A prefilled message such as "Hi, is the {{ product.title }} in stock?" works well.
- Always preview. Use Shopify's theme preview before publishing so you can confirm the button looks right on mobile.
Method 5: Wix
- Add a button element. In the Wix Editor click Add, choose Button, and drop it where you want it.
- Set the link. Click the button, open Link settings, choose "Web address" and paste your full wa.me link with any prefilled text.
- Open in a new tab. Toggle the option to open the link in a new window so visitors keep your site open behind WhatsApp Web.
- Want it floating? Wix also offers a built-in WhatsApp chat widget under Add, Contact — enable it, enter your number, and it pins to the corner automatically.
- Style to match. Recolour the button to WhatsApp green and add the icon so it is recognisable.
Writing a great prefilled message
- Keep it short and natural. "Hi PayPerWA, I'd like a demo" beats a long paragraph.
- Add page context. On a pricing page: "Hi, I have a question about pricing." On a product page, include the product name.
- Encode special characters. Spaces become %20, commas become %2C, line breaks become %0A. Any link generator does this for you.
- Never put sensitive data (passwords, full card numbers) in a prefilled message — the text is visible in the URL.
Where to place the button for the most clicks
- Floating bottom-right widget for site-wide reach — the single highest-impact spot.
- Contact and "Get a quote" pages, where intent is highest.
- Product and pricing pages, so questions get answered before the visitor leaves.
- Header or sticky navigation on mobile, where a tap is more natural than typing an email.
- Cart and checkout-adjacent areas to rescue hesitating buyers.
Tracking clicks so you know it is working
- UTM-style or event tracking. If you use an analytics tool, fire a click event when the button is tapped. Name it clearly, e.g. "whatsapp_button_click".
- Distinct prefilled messages per page. Use a slightly different ?text= on each page (e.g. mention the page) so when chats arrive you can see which page drove them.
- Multiple numbers or links for big campaigns let you attribute volume by source.
- Watch reply time, not just clicks. The button only converts if someone answers quickly. This is where a platform that routes, schedules and automates replies earns its keep.
Free button vs. a full WhatsApp platform
Frequently Asked Questions
Is adding a WhatsApp chat button to a website free?
Do I need the WhatsApp Business API to add a chat button?
What is the correct wa.me link format?
How do I add a floating WhatsApp button to WordPress?
Can I prefill a message in the chat button?
Where should I place the WhatsApp button for the most clicks?
Will the button open the WhatsApp app or WhatsApp Web?
Create your account and send your first campaign today
Free account. No subscription — just ₹0.20 per message + Meta's rate (India marketing ₹0.86, utility ₹0.115).
PayPerWA Team
We build PayPerWA, a pay-per-message WhatsApp Cloud API platform. No subscriptions, no hidden fees — Meta's rate plus a flat ₹0.20 per message.