How to Add a WhatsApp Button to Your Website
Most customers would rather send a quick WhatsApp message than fill in a form or make a phone call. A WhatsApp button puts that option on your website, so a visitor can start a chat with you in one tap. You do not need to be a programmer. This guide gives you code you can copy, and shows where to paste it.
Step 1: Make your WhatsApp link
Every WhatsApp button is just a link in a special format: https://wa.me/ followed by your phone number with the country code, digits only. No plus sign, no spaces, and no zero at the start of the local number. For example, a Nigerian number 0801 234 5678 becomes 2348012345678.
Our free tool builds the link for you, cleans up the number, and adds a ready-typed message.
Open the WhatsApp Link GeneratorStep 2: Add a simple text button
This is the easiest version. It works on almost any website.
<a href="https://wa.me/2348012345678?text=Hello%2C%20I%20need%20help"
target="_blank" rel="noopener">
Chat with us on WhatsApp
</a>
Change the number to yours. The text after ?text= is the message that appears already typed. Spaces become %20, which our link generator does for you.
Step 3: Add a floating button (optional)
A floating button stays in the corner of the screen as visitors scroll, so it is always one tap away.
<a href="https://wa.me/2348012345678" class="wa-float"
target="_blank" rel="noopener">Chat on WhatsApp</a>
<style>
.wa-float{position:fixed;right:16px;bottom:16px;z-index:999;
background:#25D366;color:#fff;padding:12px 18px;
border-radius:30px;font:700 16px sans-serif;text-decoration:none}
</style>
Step 4: Paste it in the right place
- A website you or a developer coded: paste the code just before the closing </body> tag on each page.
- WordPress: add a Custom HTML block to the page, and paste the code in.
- Website builders (Wix, Squarespace and similar): look for an Embed, HTML or Custom code element. Many also have a built-in WhatsApp or chat button in their app store.
- Online stores: use the theme's "custom HTML" or "custom liquid" area, or ask whoever manages the store.
Tips for better results
- Write a helpful pre-filled message. "Hi, I'd like to order from your menu" is better than "Hello". It tells you what the customer wants.
- Put the button where decisions happen: near prices, the menu, the booking section and the contact page.
- Say when you reply. Add a line such as "We reply within one hour, 9am to 6pm."
- Test it on a phone and a computer. On a computer it opens WhatsApp Web or the desktop app.
Common mistakes
- Using a number with a plus sign, spaces, or the local zero still on the front.
- Forgetting the country code.
- Putting a personal number on a public site that you do not want customers to message.
Frequently asked questions
Is a WhatsApp button free?
Yes. A WhatsApp link costs nothing, and customers do not need to save your number first.
Does it work with WhatsApp Business?
Yes. The same link works for regular WhatsApp and WhatsApp Business numbers.
Can I show it only on mobile?
Yes, but it is usually better to show it everywhere, because desktop visitors can use WhatsApp Web.