How to create a WhatsApp link with a pre-filled message
Build a wa.me click-to-chat link with your number and an encoded message, test it on phones and WhatsApp Web, and turn it into a printable QR code.
A WhatsApp link with a message has three parts: https://wa.me/, your full phone number with the country code, and ?text= followed by the URL-encoded message. Whoever opens it sees a chat with you and the message already in the text field. They can edit it before sending.
This guide follows a made-up home-cleaning service in Austin that takes booking questions in English and Spanish on the fictional number +1 512 555 0143. It wants one QR code for its van and flyers. Links can shorten the chat link and make the QR code. WhatsApp Business tools and WhatsApp’s API aren’t covered.
Build the wa.me address from your number
WhatsApp’s click-to-chat help page gives the format https://wa.me/<number>, with the full number in international format, country code first. Leave out the plus sign, spaces, brackets and dashes. Drop a leading 0 that you dial only inside your country.
| Address | Correct? |
|---|---|
https://wa.me/15125550143 |
Yes |
https://wa.me/+1-(512)-555-0143 |
No: plus sign, brackets, dashes |
https://wa.me/5125550143 |
No: country code missing |
WhatsApp’s guide to international numbers covers a few country exceptions, such as Argentina. The number also needs an active WhatsApp account.
Add a pre-filled message and encode it
Add ?text= and the message in URL-encoded form: spaces, most punctuation and accented letters become codes that start with %. The English message Hi, I'd like a cleaning quote gives:
https://wa.me/15125550143?text=Hi%2C%20I'd%20like%20a%20cleaning%20quoteThe codes you’ll need most often:
| Character | Write it as |
|---|---|
| Space | %20 |
| Comma | %2C |
| ? | %3F |
| & | %26 |
| ¿ | %C2%BF |
| á | %C3%A1 |
An unencoded & or # ends the message early. To encode a whole message, type encodeURIComponent("your message") in a desktop browser’s developer console, press Enter and copy the result without its quotes (MDN explains it).
For a message with no number, use https://wa.me/?text= and the message. WhatsApp shows a list of contacts to send it to.
Test the link on phones and a computer
Before printing, open the full link:
- On an iPhone and an Android phone with WhatsApp.
- On a computer with WhatsApp Web.
- On a phone without WhatsApp, to see what a newcomer gets.
- From where you’ll publish it: your website, an email, and later the QR code.
Check that the number, ¿ and accented letters look right. Some phones may show a WhatsApp web page with a button to continue to the chat instead of opening the app. Note what you see, so your printed wording matches. Then send a test message from a second phone and check that it arrives.
Make a short link and QR code
In the Links app, create a link and paste the full encoded address as its destination. Links only accepts web addresses, so https://wa.me/… works and whatsapp:// doesn’t. It also refuses an address with spaces, which catches most messages you forgot to encode.
Open the link, press QR code and download PNG or SVG. The code holds the short link, so you can change the message after printing. A code of the full wa.me address works too, but it’s denser and can’t change. See what size a QR code should be for the van.
A ?text= added to the short link isn’t passed on, so the message must be in the saved destination.
Use rules for other languages or numbers
A link can have up to 20 rules, matching country, language, platform or device. They’re checked from the top, the first match wins, and everyone else gets the main destination:
| Order | Condition | Destination |
|---|---|---|
| Rule 1 (optional) | Country: Canada | Second team’s number and message |
| Rule 2 | Language: Spanish | Same number, Spanish message |
| Main destination | Everyone else | Same number, English message |
The Spanish destination is:
https://wa.me/15125550143?text=Hola%2C%20%C2%BFme%20pueden%20enviar%20una%20cotizaci%C3%B3n%20de%20limpieza%3FThe country rule only helps a business with a team abroad; the Austin service skips it. Language comes from the first language in the visitor’s browser, and only its main part counts, so Mexican and European Spanish both read as Spanish. It’s a guess: a Spanish speaker whose phone is set to English gets the English message and can rewrite it. The routing guide explains rule order.
Keep the chat link working after you share it
When the number or message changes, edit the destination; the short link and printed QR code stay the same. Changing the main destination doesn’t change rule destinations, so update the Spanish rule too. Don’t delete a printed link to start over. A deleted link can’t be restored, and its QR code stops working. The destination-editing guide has the steps.
Statistics show clicks per day and which destination served them. Read them as link opens, not chats: Links can’t see inside WhatsApp, one person can open the link twice, and WhatsApp’s preview of a pasted link isn’t counted.
Creating links is free, each counted click costs 0.05 credits, and new accounts start with 100. If the credits run out, the link pauses and visitors see a page saying it’s unavailable until you add more. Links gives your chat link a short address and a printable QR code.