WhatsApp QR Code Generator

Published Updated

Turn a phone number and an optional message into a QR code for a wa.me link. Everything but digits is removed, so +1 (555) 123-4567 becomes wa.me/15551234567. A leading zero stays in, which WhatsApp asks you to leave out, so the page warns when it sees one.

From input to link

These are the strings the page's code built in Google Chrome 156.

You typeThe code contains
+1 (555) 123-4567https://wa.me/15551234567
+44 7700 900123 and the message Hello there, order #12?https://wa.me/447700900123?text=Hello%20there%2C%20order%20%2312%3F
050-123-4567https://wa.me/0501234567, with the zero kept, and a warning on the page
A message with an emoji and a line break...?text=Hi%20%F0%9F%91%8B%0AWhere%20is%20my%20order%3F

What WhatsApp expects

WhatsApp's click-to-chat help page, read from an Internet Archive capture because the live page needs scripts, says the number in a wa.me link is a full phone number in international format, with any zeroes, brackets or dashes omitted. Its example of what to avoid is a number starting +001.

This page removes brackets, dashes, spaces and the plus, which covers most of that rule. It does not remove a trunk zero or a 00 prefix, because the right country code cannot be guessed from the number. When the number starts with 0, an amber warning says so and the code is still made from the number as typed, so the zero must be replaced by the country code by hand.

Phone numbers as the code reads them

Measured with the page's own code in Google Chrome 158, Firefox 155 and Playwright's WebKit build (not the Safari app). Each code on the page was read back with the jsQR 1.4.0 decoder and matched the link in all three browsers. Spaces, brackets, dots, slashes and dashes (the en dash too) are dropped.

You typeLink in the codeNote
00 44 7700 900123https://wa.me/00447700900123Amber warning: starts with 0
+001 555 123 4567https://wa.me/0015551234567Amber warning: starts with 0
1-800-FLOWERShttps://wa.me/1800Letters are removed with the other non-digits
555 1234 ext. 5https://wa.me/55512345The extension's digits join the number
+ or abcNo codeThe panel asks for a phone number
+1 ٥٥٥ 123 4567https://wa.me/15551234567Arabic-Indic digits mixed with 0 to 9
١٢٣٤٥٦٧, 1234567https://wa.me/1234567Arabic-Indic and fullwidth digits
+۴۴ ۷۷۰۰ ۹۰۰۱۲۳, and the same number in Devanagari and Thai digitshttps://wa.me/447700900123One number in three more scripts

Digits from 20 sets are read as 0 to 9: Arabic-Indic, Persian, N'Ko, Devanagari, Bengali, Gurmukhi, Gujarati, Oriya, Tamil, Telugu, Kannada, Malayalam, Sinhala, Thai, Lao, Tibetan, Myanmar, Khmer, Mongolian and fullwidth digits.

How the message is percent-encoded

The message is trimmed, and if anything is left it goes after ?text= in percent-encoded form. These are measured strings from the same runs; all three browsers built the same link, except in the CR LF row.

MessageAfter ?text=
a & b = ca%20%26%20b%20%3D%20c
100% sure100%25%20sure
x?y=z#fragx%3Fy%3Dz%23frag
+plus and space%2Bplus%20and%20space
café üñcaf%C3%A9%20%C3%BC%C3%B1
Привет%D0%9F%D1%80%D0%B8%D0%B2%D0%B5%D1%82
日本語%E6%97%A5%E6%9C%AC%E8%AA%9E
A family emoji built from three people and two joiners%F0%9F%91%A8%E2%80%8D%F0%9F%91%A9%E2%80%8D%F0%9F%91%A7
two, a Windows line break (CR LF), linestwo%0Alines in Chrome 158 and Firefox 155, whose text box handed over only the line feed; two%0D%0Alines in the WebKit build, which kept both
A tab between two wordstab%09here
a~b*c(d)e!f'gUnchanged
Three spaces onlyNo ?text= at all, a plain chat link
Half of an emoji (an unpaired surrogate) inside a messagebad%20%EF%BF%BD%20text: replaced by U+FFFD

RFC 3986 recommends that text in a new URI scheme is first turned into UTF-8 bytes and that only bytes outside its unreserved set (letters, digits, hyphen, period, underscore and tilde) are percent-encoded. The page follows that, and also leaves ! ' ( ) * as they are, which the a~b*c(d)e!f'g row shows.

Message length and code size

The link starts as https://wa.me/15551234567 (25 bytes) and grows by the encoded message. Version numbers are what the qrcode library chose, measured in the same runs. DENSO WAVE's version page says version 1 is 21 x 21 modules and each higher version adds 4 modules per side.

Message length (plain English text)Link bytesLM (default)QH
None252 (25 x 25)2 (25 x 25)2 (25 x 25)3 (29 x 29)
20 characters594 (33 x 33)4 (33 x 33)5 (37 x 37)6 (41 x 41)
100 characters1738 (49 x 49)9 (53 x 53)11 (61 x 61)13 (69 x 69)
500 characters74719 (93 x 93)22 (105 x 105)26 (121 x 121)31 (141 x 141)
1,000 characters1,46327 (125 x 125)32 (145 x 145)38 (169 x 169)Too long

The longest message that still fit after that number was 2,924 letters at L, 2,302 at M, 1,634 at Q and 1,244 at H, or 354, 278, 197 and 150 waving-hand emoji (each is 12 characters once encoded). One letter more at M, and the panel showed The amount of data is too big to be stored in a QR Code in place of the code.

Making a chat code

  1. Step 1

    Type the number with its country code

    Spaces, brackets, dashes and a plus sign are stripped. A number with no digits leaves the code blank.

  2. Step 2

    Add a message if you want one

    The text is trimmed and percent-encoded after ?text=. Leave it empty for a plain chat link.

  3. Step 3

    Download PNG or SVG

    The same panel sets colors, size and error correction. A short link gives a small, coarse pattern that is easy to scan from a distance.

Why the code stays small

A bare link is 25 bytes and fits version 2, which is 25 x 25 modules. Adding Hello there makes 44 bytes and version 3 at 29 x 29.

  • Fewer modules means each one prints larger at the same physical size, which helps on small prints.
  • A long pre-filled message pushes the code to larger versions and finer modules.
  • For several numbers at once, Bulk QR Code Generator accepts a column of ready-made wa.me links.

WhatsApp code questions

Do I include the plus sign and country code?

Include the country code. The plus sign makes no difference because every non-digit is removed. A UK mobile typed as 07700 900123 needs to be 44 7700 900123 instead.

Does it read Arabic or Persian digits?

Yes. Arabic-Indic and Persian digits, and 18 other digit sets including Devanagari, Thai and fullwidth digits, are read as 0 to 9, so +1 ٥٥٥ 123 4567 gives wa.me/15551234567. Every other character is removed.

Can the person who scans change the message?

WhatsApp's help page says the pre-filled message appears in the text field of the chat, so the person scanning sees it before anything is sent.

Can I make a link with a message but no number?

WhatsApp documents wa.me/?text= for that, but this page needs a number before it draws anything.

Are line breaks and emoji allowed?

Yes. A line break becomes %0A and an emoji becomes its UTF-8 percent sequence, such as %F0%9F%91%8B for a waving hand. Every added byte makes the QR code denser.

Is the number stored or shared?

No. The link is assembled and drawn by the qrcode library in your browser; this page does not upload or store the number or the message.

What happens to the letters in a number like 1-800-FLOWERS?

They are removed along with the other non-digits, so the link becomes wa.me/1800, which is not the number you meant. Type the number in digits.

How long can the pre-filled message be?

It depends on the error-correction level. With the default M, 2,302 plain letters or 278 waving-hand emoji still fit after an 11-digit number; at L the limits were 2,924 letters and 354 emoji. Past the limit the panel shows the library's message that the data is too big for a QR code.

What happens to a broken character in a pasted message?

Half of an emoji (an unpaired surrogate), which a cut-off copy can leave behind, is replaced by U+FFFD and written as %EF%BF%BD. The rest of the message is encoded as usual.

Does a Windows line break turn into %0D%0A?

It depends on the browser. When the test script entered a CR LF line break, Chrome 158 and Firefox 155 passed on only the line feed, written as %0A, while the WebKit build kept both, written as %0D%0A.

Related Tools