WhatsApp chat HTML code or WhatsApp html code for website

In this post you can find free HTML code for your WhatsApp button or Widget or Form.

If you need support about how to setup your WhatsApp in your HTML, please contact us. We are here for you.

3 options to embed a WhatsApp tool, widget, link, form in your Website or HTML code.

Option 1. Use our WhatsApp Widget to embed a WhatsApp widget in your website: You can copy and paste this code in your header to test:

<script defer data-key=”6fd735c9-1763-4c1b-b3c5-70771efb5e42″ src=”https://widget.tochat.be/bundle.js”></script>

Option 2. Copy and paste this code to add a WhatsApp Form in your Website.

<script defer data-active  data-widget-type="group" data-person="b050cf09-3959-4e9a-a426-c42971a90144" src="https://widget.tochat.be/bundle.js?key=6fd735c9-1763-4c1b-b3c5-70771efb5e42"></script><div data-active id="whatapp-people-widget"></div>

Option 3. Easy to use HTML button for WhatsApp

You can use this code to copy and paste WhatsApp into your HTML website. Just copy and paste and you will have a WhatsApp Button.

<a href="https://chatwith.io/s/5f33ce0c4aede" style="display: table; font-family: sans-serif; text-decoration: none; margin: 1em auto; color: #fff; font-size: 0.9em; padding: 1em 2em 1em 3.5em; border-radius: 2em; font-weight: bold; background: #25d366 url('https://tochat.be/click-to-chat-directory/css/whatsapp.svg') no-repeat 1.5em center; background-size: 1.6em;">Contacto con WhatsApp</a>

This code will create a button just like this one on your website:

Contact con WhatsApp

If you have a PHP or HTML website you may need to have a “script” you can embed in your Code.

Join our WhatsApp PHP developers group

If you have questions, comments, need support or ideas, please join this WhatsApp Group for PHP Developers.

How to add whatsapp link in html

If you are using HTML to create an easy to publish website or landing page, you can use our code and link to WhatsApp to create your link. 

A link to WhatsApp will look like this


You can create your link from your account and track the clicks in your link. Also you can personalized the link URL and the welcome message. 

Add WhatsApp Button to Website

Custom your WhatsApp Button for your website

If you want to have WhatsApp in your web, you can create a Widget Button like this for your website or blog, custom and create your WhatsApp Button here.

If you don’t have a site yet, and you want to create a Landing page for free with your own QR and link, click here

WhatsApp href link example

<a href="https://chatwith.io/s/link-to-whatsapp">Link to WhatsApp</a>

PHP WhatsApp Widget

We offer a solution for any PHP or HTML website that wants to have a WhatsApp widget for support and sales.

👻Go here to configure your WhatsApp Widget🚩

The look and feel of the widget can be customized and you can launch the widget using our API. This gives you the freedom to configure and set up the widgets for your clients as you really want.

You can add unlimited agents, languages, timetables and forms to your WhatsApp Widget.


💡You can also read this article in Spanish, Turkish, Greek, Italian, Danish and Polish!

Embed WhatsApp chat on website

If this is what you need you can use this tool to generate the WhatsApp Widget that you can embed in your site. We understand sometimes you develop your own website and you need to have a WhatsApp Chat Box to engage with your users.

Hyperlink WhatsApp

This is another name for WhatsApp Link. The hyperlink is the “old name” we use to use for link. This is a more technical name for links or link. You can use it if you want to look older in a meeting with your client. “We will create a Hyperlink for your WhatsApp account to reach more customers.”


How to generate a code for WhatsApp?

  1. Go to the site and create an account.
  2. Personalize your Widget. Define the look and feel, agents, URL, etc…
  3. Publish your script and you are ready to go.

Widget WhatsApp HTML

The same may happen here. If you have an HTML website and you need a free WhatsApp Widget you can use this script.

In this youtube video you can see step by step how to add your WhatsApp Widget to your website.

WhatsApp web in iframe

Using an Iframe is not the best option to add your WhatsApp widget. It is better to use a simple link to WhatsApp + a button with CSS. Iframes are not accessible and sometimes you can face issues with opening a new window to launch WhatsApp in the desktop version.

Create a better version of your WhatsApp widget, using our script.

PHP WhatsApp floating script

Tochat.be is the best solution for your website to have a WhatsApp widget. You can create your own script and include the WhatsApp Window in your website with PHP.

There are plenty of solutions base on PHP to create websites. The issue is with PHP there is not a marketplace for modules. Widgetwhats.com offers a solution to create a WhatsApp Chat bot for your PHP website.

The script we generate should be included in your header.

Website using WhatsApp Chat Bot with PHP


If you have a WordPress website, we have a plugin to install our WhatsApp Widget.

3 - 2

Thank You For Your Vote!

Sorry You have Already Voted!

By César Martín (ToChat.be)

We develop WhatsApp solutions, WhatsApp API and WhatsApp Widgets. Please contact us for more information. We are here to help you.