WaBestie

WhatsApp Chat Widget for Website

Add a floating WhatsApp chat button to your website in under a minute. Set your number, greeting and colors, watch the live preview, then copy one small snippet and paste it before the closing body tag. Works on WordPress, Shopify, Wix, Blogger and hand-coded sites.

Plain JavaScript, about 2.5 KB, no dependencies. Works on WordPress, Shopify, Wix, Blogger and any custom site.

How to use WhatsApp Chat Widget for Website

  1. 1 Enter your number Type your WhatsApp number with the country code and tune the name, greeting, color and position.
  2. 2 Check the live preview The preview shows exactly what visitors will see, including the greeting popup.
  3. 3 Copy and paste the code Copy the embed code and paste it right before the closing body tag of your site.

A contact form asks your visitor to type an email, wait for a reply, and check spam folders. A WhatsApp chat widget asks them to do what they already do a hundred times a day: open WhatsApp and send a message. This free WhatsApp chat widget generator builds a floating chat button for your website that opens a conversation with your WhatsApp number in one tap. You pick the position, colors, greeting text, and prefilled message, then copy a single block of HTML, CSS, and JavaScript into your site. No plugin, no monthly subscription, no account, and no third-party script loading from someone else’s server.

The tool is built for small business owners, freelancers, and developers who want the “chat with us on WhatsApp” bubble they see on other sites without paying for a widget service. It works on plain HTML sites, WordPress, Shopify, Wix, Squarespace, Webflow, and anything else that lets you paste custom code. Everything runs in your browser, so your phone number and welcome message never leave your device while you build the widget.

How the WhatsApp chat widget actually works

Under the hood, every WhatsApp website button relies on the same official mechanism: WhatsApp’s click to chat links. A link in the format https://wa.me/41791234567 tells WhatsApp (the app on mobile, or WhatsApp Web and Desktop on a computer) to open a chat with that number. The number must be in full international format, meaning country code first, with no plus sign, no leading zeros, no spaces, and no brackets. A Swiss number written locally as 079 123 45 67 becomes 41791234567 in the link. Get this part wrong and the button opens WhatsApp but finds nobody to talk to, which is why the generator validates the format before it produces any code.

You can also attach a prefilled message using the text parameter, for example https://wa.me/41791234567?text=Hi%2C%20I%20have%20a%20question%20about%20pricing. The message has to be URL encoded, so spaces become %20 and commas become %2C. The generator handles that encoding automatically; you type the message in plain language and the tool produces a correctly escaped wa.me URL. The visitor still has to press send inside WhatsApp, so nothing is sent without their consent.

What the generator adds on top of the link

A bare wa.me link is just a hyperlink. The widget wraps it in the interface people expect: a round floating button pinned to the bottom right or bottom left of the screen, an optional popup card with your name, profile initial, and a short greeting like “Hi, how can we help?”, and a button inside that card that launches the wa.me link. The generated snippet is self-contained. The CSS is inlined, the JavaScript only toggles the popup open and closed, and there are no external requests, no tracking pixels, and no dependency on our servers. Once the code is on your site, it keeps working even if WaBestie disappeared tomorrow.

Because the output is plain code, it is also fast. A typical generated widget weighs a few kilobytes, compared with 50 to 200 kilobytes for many hosted chat widget scripts. That difference matters for Core Web Vitals, and it is the honest answer to the common question “does a WhatsApp widget slow down my website?” A hosted one can. This one will not in any measurable way.

Real ways people use a WhatsApp website button

A restaurant in Lisbon puts the widget on its menu page with the prefilled message “Hi, I would like to book a table for”. Guests only add a date and party size, and the reservation happens in a WhatsApp chat the owner already checks constantly. A freelance web designer adds the button to her portfolio with the greeting “Ask me about your project, I usually reply within an hour”, turning casual browsers into conversations instead of unanswered contact form entries.

An online store running on Shopify uses the widget for pre-sales questions about sizing, because a two-minute WhatsApp exchange saves a return later. A driving school pins the button to its pricing page so students can ask about lesson packages without calling during work hours. A property agent puts a different prefilled message on each listing page (“I am interested in the apartment on Rua Verde”), so every incoming WhatsApp message already tells him which property the lead is asking about. Support teams that use WhatsApp Business can route these chats into their existing labels and quick replies, and the away message feature in WhatsApp Business covers the hours when nobody is answering.

Best practices for a widget that converts

Match the button to reality. If you answer WhatsApp messages between 9 and 18, say so in the greeting card. Visitors forgive a delay they were warned about and resent one they were not. Write the prefilled message from the visitor’s point of view (“Hi, I saw your website and have a question about”) rather than from yours, and keep it short enough that they read it before tapping send.

Use a WhatsApp Business number if you can. The Business app gives you a proper profile with your address, catalog, and hours, plus greeting and away messages that fire automatically when the first widget click of the day arrives. Position the button bottom right unless your site already has a scroll-to-top button or cookie banner there, in which case bottom left avoids the overlap. On the color, WhatsApp’s familiar green performs well precisely because people recognize it; a heavily rebranded gray button gets mistaken for something else. Finally, test the finished widget on a real phone. Desktop clicks route to WhatsApp Web, which behaves slightly differently from the mobile app, and most of your clicks will come from phones.

Common mistakes and how to avoid them

The number format causes most failures. People paste “+41 79 123 45 67” or a local number without the country code, and the resulting wa.me link is dead. Strip everything down to digits with the country code in front. Another frequent error is pasting the snippet inside a rich text editor, which converts straight quotes into curly ones and silently breaks the HTML; always use your platform’s custom HTML or code embed block instead.

Pasting the code twice is surprisingly common on WordPress, where someone adds it to a page and also to a site-wide footer, producing two overlapping buttons. Add it once, in the footer or a global code injection area, and it appears everywhere. Writing an essay as the prefilled message is another trap; long text looks like spam to the visitor and some older WhatsApp versions truncate it. One or two sentences is plenty. Lastly, do not link the widget to a personal number you would mind strangers having. Whoever taps the button sees the number the moment the chat opens, so use the business line you intend the public to know.

Troubleshooting the generated widget

The button appears but WhatsApp says the phone number is invalid. The number in the wa.me link is not in international format, or that number has no WhatsApp account. Rebuild the code with country code plus number, digits only, and confirm the number is actually registered on WhatsApp by messaging it from another phone.

Nothing happens on desktop when the button is clicked. Desktop clicks open WhatsApp Web or the desktop app. If the visitor has never linked a device, WhatsApp Web shows a QR code login screen first, which can look like a failure but is expected behavior on that visitor’s machine, not a bug in your widget.

The prefilled message shows %20 instead of spaces. The text was encoded twice, usually because it was edited by hand after generation. Regenerate the snippet in the tool rather than editing the URL directly.

The widget sits behind another element or under the cookie banner. Raise the z-index in the generated CSS or switch the position from bottom right to bottom left. Because you own the code, a one-line CSS change fixes layering issues that hosted widgets make you file support tickets for.

The button does not show up at all. Check that the snippet was pasted into an HTML block, not a paragraph block, and that your theme did not strip the script tag. On platforms that forbid custom JavaScript on lower plans, you can still use the widget in link-only mode, where the button is a plain wa.me anchor with no popup card and no script at all.

Key features

Visual widget builder

Configure position, colors, greeting text, agent name, and prefilled message with a live preview before you touch any code.

Clean copy-paste code

Get one self-contained snippet of HTML, CSS, and JavaScript with no external scripts, trackers, or dependencies on our servers.

Correct wa.me links guaranteed

The tool validates international number format and URL-encodes your prefilled message so the click to chat link works on every device.

Works on any platform

Paste the snippet into plain HTML, WordPress, Shopify, Wix, Squarespace, or Webflow without installing a plugin or app.

Why people use it

  • Turn visitors into WhatsApp chats People reply to WhatsApp far more readily than to contact forms, so questions that would have been abandoned become real conversations.
  • Zero cost, zero lock-in The generated code is yours forever, with no subscription, branding badge, or hosted script that stops working if a service shuts down.
  • No performance penalty A few kilobytes of inline code loads instantly, unlike hosted chat widgets that can drag down your Core Web Vitals scores.

Frequently asked questions

How do I add a WhatsApp chat button to my website for free?

Enter your WhatsApp number in international format, customize the button and greeting in this generator, then copy the snippet into your site's footer or a custom HTML block. The widget uses WhatsApp's official wa.me click to chat links, so there is nothing to pay for and no plugin to install.

Do I need WhatsApp Business for the widget to work?

No, the widget works with any number registered on WhatsApp, personal or Business. WhatsApp Business is still worth using because it adds a company profile, greeting messages, and away messages that pair well with website traffic.

Will the WhatsApp widget slow down my website?

Not noticeably. The generated snippet is a few kilobytes of inline HTML, CSS, and JavaScript with no external requests, unlike hosted widget services that load much larger scripts from third-party servers.

Can I add a WhatsApp widget to WordPress without a plugin?

Yes. Paste the generated code into a Custom HTML block, your theme's footer template, or a code injection area. One paste in a site-wide location shows the button on every page with no plugin overhead.

What happens when someone clicks the button on a desktop computer?

The wa.me link opens WhatsApp Web or the WhatsApp desktop app with your chat ready. If the visitor has never linked a device, WhatsApp Web first shows its QR login screen, which is normal behavior and not a widget error.

Can I set a different prefilled message on different pages?

Yes. Generate a separate snippet per page with its own text parameter, for example one message for your pricing page and another for a product page, so every incoming WhatsApp chat tells you exactly what the visitor was looking at.

Privacy & security

This generator runs entirely in your browser. Your WhatsApp number, greeting text, and prefilled message are used only on your device to assemble the code snippet, and nothing is uploaded, stored, or logged on our servers. The widget code you copy is equally self-contained, so your website visitors are never routed through WaBestie either.

Sources

Your WhatsApp bestie has more tricks

Message packs, fancy text, symbols, links and QR codes. Every tool runs in your browser, free, no sign-up.

Explore all 389 tools