WhatsApp button for your website
Make a free floating WhatsApp chat button for your website. Enter your number, pick a color and a corner, and copy one block of code to paste before the closing body tag. Visitors tap it and a WhatsApp chat with you opens, with your message already typed.
Make your WhatsApp button
Preview
A stand-in page. The button sits the same way on yours.
Nothing you type here is uploaded. The code is built in your browser.
How to add the WhatsApp button to your website
Copy the code, then paste it once where it loads on every page, just
before the closing </body> tag. The steps below
follow each platform's own help pages.
Any HTML site
Open your page template, or each page that should show the button, and
paste the code right before </body>. Upload the file
and reload the page.
WordPress
In the block editor, add a Custom HTML block (type /html on a new line), click Edit HTML, paste the code and click Update. WordPress strips the code's styles when your user role cannot post unfiltered HTML, and on WordPress.com the style and input tags need a paid plan with hosting features turned on.
Shopify
From your Shopify admin, go to Online Store, open your theme's menu and
select Edit code. Open theme.liquid, paste the code just
before </body> and click Save. Shopify suggests
duplicating your theme first as a backup.
Wix
In your site's dashboard, open Settings, then Custom Code under Development & integrations. Click Add Custom Code, paste the code, choose All pages, place it in Body - end and click Apply. Wix runs custom code only on a published site with a connected domain.
Squarespace
Open the Code Injection panel and paste the code in the Footer field,
which Squarespace adds before </body> on every page,
then click Save. Code injection is available on the Core, Plus and
Advanced plans.
Tiendanube and Nuvemshop
Tiendanube retired its tracking code fields and recommends Google Tag Manager for scripts that change how a store looks, on paid plans only. Paste your Tag Manager ID under Configuración, Códigos externos (Configurações, Códigos externos on Nuvemshop). Then in Tag Manager add a Custom HTML tag with the code, trigger it on page views and publish the container.
What the code does
- It is one block of HTML and CSS with the WhatsApp glyph drawn inline. It runs no script and loads nothing from yapper.chat or anywhere else.
- It sets no cookies and stores nothing in your visitors' browsers.
-
Every class name starts with
ywab-, so your site's styles and the button's styles stay out of each other's way. - The button is a plain link to wa.me with a label for screen readers, a visible focus ring for keyboard users, and no animation for visitors whose device asks for reduced motion.
- The glyph and text are white or black, whichever contrasts more with your color. On WhatsApp green that is black, since white on that green measures under 2:1.
- To remove the button, delete the block between the two "WhatsApp button" comments.
Using the WhatsApp name and logo
WhatsApp's brand guidelines set a few rules for showing its name and logo on your site. The button follows them:
- The glyph keeps its shape and is never recolored to match your brand.
- WhatsApp is written with a capital W and A, never shortened, and not used as a verb: "Chat on WhatsApp" works, "WhatsApp us" does not.
- The logo should not be the most prominent thing on your page, and a corner button is not.
- Nothing on the button suggests that WhatsApp sponsors or endorses your business.
Yapper is not affiliated with WhatsApp or Meta.
About the Yapper credit
By default the code adds a small "Button by Yapper" line under the
button, linking to Yapper's home page. It is optional: untick Credit
above and it is gone, with nothing else changing. The link text is only
our name, it stays visible at the size you see in the preview, and it
carries rel="nofollow", in line with Google's spam policies
on links spread through widgets.
When the chats start coming in
A button brings the chats. Answering every one of them, at night and on weekends, is the hard part. Yapper replies to your WhatsApp conversations in your voice, learns your business from your own documents, and hands a chat to you the moment it needs a person.
Try it from your phone before you pay.
See how it works for salons, restaurants and vet clinics.
Related tools and guides
- WhatsApp link generator: a plain wa.me link and a QR code for your bio, ads and print.
- WhatsApp API pricing: what Meta charges per message on the WhatsApp Business Platform, by country.
Frequently asked questions
Is this WhatsApp button free?
Yes. There is no signup, no limit and no account. The code is yours to keep, it keeps working without Yapper, and the small credit line is optional.
Does the WhatsApp button slow down my website?
No. It is a few kilobytes of HTML and CSS with the icon drawn inline. It loads no script, font or image, and makes no request until a visitor taps it.
What happens when a visitor taps the button?
It opens a wa.me link to your number in a new tab. On a phone that opens the WhatsApp app, on a computer WhatsApp Web or the desktop app, with your pre-filled message in the input box. The visitor still presses send.
Do I need WhatsApp Business to use the button?
No. Click to chat links work with any WhatsApp number, personal or business. Use the number your customers should reach, in full international format.
Can I show the button only on phones or only on computers?
Yes. Untick either screen type under "Show the button on". The code then hides the button on screens narrower or wider than 768 pixels.
Is the code safe to paste into my site?
Yes. It holds no script, and everything you type into the generator is escaped before it goes into the code, so a message or label cannot add markup or scripts to your page.
Can I remove the "Button by Yapper" credit?
Yes. Untick Credit before you copy the code, or delete the line with the Yapper link from the code you already pasted. The button works the same either way.
Sources
Checked November 10, 2026.
- WhatsApp Help Center: How to use click to chat
- WhatsApp brand guidelines
- Google Search Central: spam policies (link spam)
- WordPress: Custom HTML block · WordPress.com: Custom HTML block
- Shopify Help Center: Editing theme code
- Wix Help Center: Embedding custom code on your site
- Squarespace Help Center: Using code injection
- Tiendanube: How to install Google Tag Manager · Tiendanube: External tools after the tracking code fields · Nuvemshop: Adding a script with Google Tag Manager