Write the number the way WhatsApp reads it
When a WhatsApp code opens the app but not the chat, the number inside is usually written the way you'd dial it at home. WhatsApp's click-to-chat help page asks for the full number in international format and says to "omit any zeroes, brackets, or dashes."
In practice that means the country code first, then the number without its leading 0. A UK mobile you'd dial at home as 07700 900123 becomes +44 7700 900123.
The generator does the cleaning for you. It strips spaces, brackets and dashes, turns a 00 international prefix into the country code, and refuses a number that starts with a single 0, with a note asking for the country code instead. That last check exists because a code made from 07700 900123 would send WhatsApp looking for a number that doesn't exist, and the chat would never open.
The wa.me link
A wa.me link, which is WhatsApp's own documented format. For +91 98765 43210 with a ready-typed message, our generator writes:
https://wa.me/919876543210?text=Hi%2C%20I'd%20like%20to%20book%20a%20table
%20 is a space and %2C is a comma. Links can't contain spaces, so the message is encoded, and WhatsApp turns it back into normal text in the chat box. The person still taps send, and can edit the words first.
Leave the number empty and the code opens WhatsApp with just the message, then shows the person's contacts so they can choose who gets it. It's a good fit for "share this with a friend" on a poster:
https://wa.me/?text=Check%20out%20this%20caf%C3%A9
Nothing goes through our servers, so the code is static and works for as long as the number is on WhatsApp. Keep the message to a sentence. The 74-character link above makes a code 37 squares wide; a number with no message makes one 25 wide, and the smaller the grid, the easier it is to scan from a flyer.
How it differs from the code inside WhatsApp
WhatsApp has its own QR code under Settings, next to your name. It adds you as a contact, and you can reset it, which stops the old one working. The code made here is built from your phone number, so it keeps working unless your number changes, and it can carry a pre-typed message, which WhatsApp's own code can't.
Use WhatsApp's code for swapping contacts in person. Use this one for anything printed: a shop counter, a delivery bag, a flyer, a "for sale" sign with the listing named in the message so you know which one people mean.
The WhatsApp Web login code is something else
Searches for "WhatsApp QR code" often mean the code at web.whatsapp.com. That one logs a computer into your account. You scan it from Linked devices in WhatsApp, it changes every few seconds, and it can't be made or printed.
It's also a common scam. If someone sends you a code and asks you to scan it from Linked devices, don't: it would link their computer to your account and show them your chats. The code on this page opens a chat and can't log anyone in. More on codes used for scams is in what is quishing.