How to add a WhatsApp chat button to your website
Add a WhatsApp chat button to your website with a few lines of code or your site builder, with a ready first message, good placement and no slowdown.

Customers who are on your website and have a question are the warmest people you will ever talk to. If they have to find your phone number, copy it, open WhatsApp and type from scratch, most will not. A chat button puts one tap between "I have a question" and a chat with your team.
This guide shows how to add a WhatsApp chat button to your website: the simple version, a floating version, and what to check so it helps rather than annoys.
What a chat button does
A chat button is a link styled as a button. When someone taps it, WhatsApp opens with your business number ready. On a phone it opens the app. On a computer it opens WhatsApp Web or the desktop app. You can add a first message so the customer does not face a blank box.
It is the same idea as a click-to-chat link, placed on your site. No script, no tracking and no extra software are needed for the basic version.
Before you start
You need two things:
- Your WhatsApp Business number, in international format with no plus sign, zeros, spaces or dashes. For example, the US number +1 (555) 123-4567 becomes 15551234567.
- Someone watching that number. A button is a promise that a person will answer. If chats go to a phone nobody checks, it does more harm than having no button. Read the team inbox guide if more than one person will answer.
Method 1: a plain button link
Add this where you want the button. It works in any page that lets you paste HTML.
<a class="wa-btn" href="https://wa.me/15551234567?text=Hi%2C%20I%20have%20a%20question%20about%20your%20website"
target="_blank" rel="noopener">
Chat with us on WhatsApp
</a>What each part does:
hrefis the link: your number, then?text=and a first message with spaces written as%20.target="_blank"opens the chat in a new tab on a computer.rel="noopener"keeps the new tab from controlling your page.- The words inside are what the visitor reads. Say what will happen: "Chat with us on WhatsApp" beats "Click here".
Give it a simple style:
.wa-btn {
display: inline-block;
padding: 14px 22px;
border-radius: 999px;
background: #1f7a4d;
color: #ffffff;
font: 700 16px/1.2 system-ui, sans-serif;
text-decoration: none;
}That green has strong contrast against white text, so it stays readable. Whatever colors you pick, check that the text is easy to read.
Method 2: a floating button
A floating button stays in the corner of the screen as the visitor scrolls. Add the same link, with these styles:
.wa-float {
position: fixed;
right: 16px;
bottom: 16px;
z-index: 50;
padding: 14px 20px;
border-radius: 999px;
background: #1f7a4d;
color: #ffffff;
font: 700 16px/1.2 system-ui, sans-serif;
text-decoration: none;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}Use class="wa-float" on the link instead of wa-btn.
Check three things after adding it:
- Does it cover something? Test on a phone. A floating button can sit on top of a "buy now" bar, a cookie notice or a form's submit button. Move it to the left, or raise it with a larger
bottomvalue. - Can a keyboard reach it? It is a normal link, so Tab reaches it. Keep it that way.
- Is it big enough to tap? Keep the button at least 44 pixels tall.
Method 3: your site builder
Most website builders (the kind where you drag and drop pages) give you one of these:
- A button or link element. Add one, paste your wa.me link as its address, and set it to open in a new tab.
- A "custom code" or "embed HTML" block. Paste Method 1 or 2 there.
- A site-wide code box, often called the footer or header code. Paste the floating button there so it shows on every page.
Menu names differ from builder to builder. Search your builder's help for "add a button link" or "custom HTML".
For a shop on a store platform, add the button to the product page template as well as the contact page. A question on a product page is the one most likely to become a sale.
Write a first message that helps your team
The first message shows up in your inbox, so make it useful. Use a different one for each place:
- Home page: "Hi, I have a question about your services."
- Product page: "Hi, I have a question about PRODUCT NAME." If your site can fill in the product name, do it. If not, keep it general.
- Booking page: "Hi, I would like to book an appointment."
- Contact page: "Hi, I have a question from your website."
When the chat arrives, your team knows what it is about before opening it. You can also count chats by first message to see which pages bring in questions.
Placement that works
- Visible without scrolling on a phone. A button at the bottom of a long page is found by few people.
- Near the question. Product pages, pricing, delivery information and the booking form are where people hesitate.
- Also on the contact page. Add it next to your address and hours, not instead of them.
- One clear button. Three chat tools and a pop-up are noise. One button, one message.
- Say when you answer. A line such as "We reply from 9 am to 6 pm, Monday to Saturday" beside the button sets the right expectation.
Do not open a pop-up on page load, play a sound or follow people around with a moving bubble. They make people close the tab.
Keep your site fast
A plain link button costs almost nothing: a few hundred bytes and no extra requests. Many chat tools load a script, fonts and images on every page, which can slow it. Before adding anything heavier, ask what it loads and whether it is worth it.
The Zotrion chat button is a link to your chat. On the Free plan it shows a small "Powered by Zotrion" badge, and paid plans remove it. You can read what each plan includes on the pricing page.
What happens after the tap
The visitor's first message arrives in WhatsApp. From there:
- The 24-hour window opens, so you can reply freely. See the 24-hour window guide.
- Your greeting or away message can answer first if nobody is at the desk.
- Your team replies from the shared inbox, and each chat shows who owns it.
If you want that shared inbox and a chat button you can manage without code, see how Zotrion works.
A short checklist before you publish
- Test the button on a phone and on a computer.
- Check the first message reads well, with no strange symbols.
- Make sure the number is the right one, including the country code.
- Confirm the button does not cover other buttons on a small screen.
- Decide who answers, and when.
- Add a line about your reply hours near the button.
Frequently asked questions
Can I add a WhatsApp button to my website for free?
Yes. A plain link to wa.me with your number costs nothing and needs no plugin. Messaging costs are separate and depend on how you use WhatsApp.
Do I need a developer?
Not for the simple version. If your site builder lets you add a button with a link, you can do it yourself. For a floating button you need to paste a few lines of code into a custom code block.
Does the WhatsApp button work on a computer?
Yes. It opens WhatsApp Web or the desktop app. If the visitor has neither, WhatsApp offers to continue in the browser.
Will a chat button slow down my site?
A plain link will not. Tools that load extra scripts can, so check what any tool adds.
How do I know the button is working?
Count chats that arrive with your website's first message. In Zotrion, chat links also show a click count.
Last updated . Prices and rules change from time to time, so check WhatsApp's own pages before you decide.


