Skip to content
▸ Chatsac Tools

Installation guide · plain HTML

HTML WhatsApp button code: add it to your website

Add a floating WhatsApp button to an HTML site or builder that supports JavaScript. Generate the code, place it before </body> and test it on a phone.

Content reviewed on October 2, 2026

Generate button code

How the button works

The button opens a WhatsApp conversation with your chosen number and draft message. The visitor confirms sending in WhatsApp. The widget does not reply to messages, assign conversations or connect the WhatsApp API.

Custom HTML and JavaScript execution are separate permissions. If the editor accepts HTML but blocks scripts, this installation path will not work. Check your platform documentation before changing plans.

Installation steps

  1. 1. Generate button code

    Enter the number including its country code, write a short message and choose the color, size and position. Check the preview and copy the code. The same configuration works with the four installation options.

  2. 2. Add the script once

    In your HTML file, paste the snippet before </body>. In a website builder, look for footer code or JavaScript injection. For React or another framework, use the shared layout and avoid mounting the widget again on every navigation.

  3. 3. Publish and test a conversation

    After publishing, open the page on a phone and computer. Check the country code and number, tap the button and check the draft message. If the icon is missing, check whether the editor kept the script and whether your site security policy allows tools.chatsac.com.

Check before publishing

The editor removes scripts

Check the published HTML, not only the editor. If the script was removed, use a code area supported by your platform and plan.

The icon covers content or another button

Try both positions and all three sizes on a phone. Check cookie banners, carts and other widgets. If you already have another WhatsApp button, choose which one to keep.

Wrong number or draft message

Include the country code and use a number you control. Keep personal information out of the initial message. The visitor can edit this draft before sending.

Frequently asked questions

Is the button free?

The generator and widget are free and include Chatsac Tools branding. Your website platform may restrict custom code based on its plan or your permissions.

Do I need the WhatsApp API?

No. The button uses a wa.me link to open WhatsApp. Automation, multiple agents and CRM connections require a separate service.

Does the button guarantee sales or send weekly reports?

There is no sales guarantee. The service records installation and click beacons, which do not prove that a message was sent. Weekly email reports are not available yet.

Platform documentation