A free tool from Hatif
Add a WhatsApp chat button to your website
Choose where the button sits, its color and a ready message, then copy the code and paste it into your site. Visitors tap the button and a chat with you opens in WhatsApp.
- Lightweight code, no libraries
- Works on mobile and desktop
- Free, no sign-up
For example 051 234 5678. For numbers outside Saudi Arabia, add the country code with +.
Leave it empty for a round button with the WhatsApp logo.
Button position
Color
The logo and text change color automatically so they stay clear on the color you pick.
Button preview on your site
Code
Paste it into your site before the </body> tag.
Enter your number and the code appears here
How to add a WhatsApp button to your website
- 01
Enter your number and message
The number with its leading zero or country code. The ready message appears typed out for the visitor in the chat.
- 02
Choose the look
Position, color and text, with a preview of the button as it will look on your site.
- 03
Copy the code and paste it in
Before the </body> tag in your site’s template, or in your platform’s custom code field.
Where to paste the WhatsApp button code
The code is a single line of HTML, so it works anywhere that lets you add code.
-
WordPress
In the theme editor, in footer.php before </body>, or with a plugin that inserts code into the footer.
-
Store platforms
In the custom code or footer code field in your store settings, if your plan allows it.
-
Google Tag Manager
Add a Custom HTML tag, paste the code in, and set it to fire on all pages.
-
HTML website
Paste it before </body> on every page where you want the button.
How the code works
The code is a wa.me link with its styling written inside it, with no JavaScript and no files from an outside server. So it doesn’t slow your site down, doesn’t collect any data about visitors, and works even when the browser blocks scripts.
A different message for each page
Use a ready message that names the page or product, like “I’d like to ask about the Business plan”. The first message tells you where the customer came from and what they want, without them having to explain from the start.
Common questions about the WhatsApp website button
Before you add the button to your site.
How do I add a WhatsApp button to my website?
Enter your number in the tool and choose the look, then copy the code and paste it into your site before the </body> tag. The button appears in the corner of every page that has the code.
How do I add a WhatsApp button in WordPress without a plugin?
From the dashboard, open the theme file editor and paste the code before </body> in footer.php. A child theme is safer, so the code isn’t lost when the theme updates.
Does the code slow down my website?
No. The code is a single link with the logo drawn inside it, with no scripts and no files loaded from another server.
Does it work on Salla, Zid and Shopify?
If your platform lets you add custom HTML code to the footer, paste it there. Some platforms only allow custom code on certain plans.
How do I make the button open a ready message?
Write it in the ready message field, and it’s added to the link in the code. Visitors find it typed out in the chat and send it with one tap.
Can I change the button’s position or color after I install it?
Yes. Change the settings in the tool, copy the code again, and put it in place of the old one.
Does it work with WhatsApp Business?
Yes. It works with any number on WhatsApp or WhatsApp Business, in any country.
How do I know how many people clicked the button?
The code doesn’t track visitors. You can use a different ready message for each page or campaign, and the first message tells you where the customer came from.
Is the tool free?
Yes. It’s completely free with no sign-up, and the button has no watermark and no subscription.
WhatsApp is a trademark of Meta. These tools are made by Hatif and are not officially affiliated with WhatsApp.
More free tools from Hatif
All tools-
Test your number
We message and call your business number like any customer would, and within 24 hours you get a report on how fast your team replies.
-
WhatsApp QR code
A QR code that opens a chat with you, with a message ready to send. PNG and SVG for print.
-
WhatsApp button for your website
A floating button in your colors with your own opening message. Copy the code and paste it into your site.
-
WhatsApp text formatter
Bold, italic, strikethrough and lists, with a preview that looks like WhatsApp.
-
WhatsApp template checker
Catches template mistakes before you submit it for review, and predicts its category.
-
Saudi business number directory
Find the number of any company or organization in Saudi Arabia by name, or enter a number to see whose it is.
-
Phone number lookup
Enter any number or calling code to see its country and type, and its region if it’s a Saudi landline.
-
Phone number formatter
Paste a list of numbers in any format and get them back in 966 format, with duplicates removed.