WAButton
Back to all articles

The Complete Guide to WhatsApp Click-to-Chat Links and URL Schemes

Master WhatsApp wa.me links, international phone number formatting (E.164), pre-filled text encoding, and QR code sharing for your business.

W

WAButton Technical Team

Developer Relations

4 min read
The Complete Guide to WhatsApp Click-to-Chat Links and URL Schemes — visual guide & strategy

WhatsApp's "Click-to-Chat" feature allows users to begin a chat with someone without having their phone number saved in their phone's address book. As long as you know a person's or business's phone number and they have an active WhatsApp account, you can create a direct link that opens a chat window immediately.

While the concept sounds simple, subtle formatting errors—such as including plus signs (+), leading zeros (0), parentheses, or incorrect percent-encoding for line breaks—cause millions of broken links every day.

In this comprehensive developer guide, we cover the exact URL schemas, number sanitization rules, and advanced formatting tricks to ensure your WhatsApp links work flawlessly on desktop, iOS, and Android.


1. The Official WhatsApp URL Formats

WhatsApp officially supports two URL formats for initiating direct conversations:

The Modern Standard: https://wa.me/<number>

The recommended, modern standard is wa.me, a short domain owned by WhatsApp/Meta:

https://wa.me/14155552671

With pre-filled text:

https://wa.me/14155552671?text=Hello%20I%20have%20a%20question

The Legacy Endpoint: https://api.whatsapp.com/send

An older API endpoint that remains fully backwards compatible:

https://api.whatsapp.com/send?phone=14155552671&text=Hello%20World

Recommendation: Always use https://wa.me/ for modern websites, social media bios, and marketing campaigns. It is 16 characters shorter, loads faster, and resolves cleanly across mobile operating systems.


2. Phone Number Formatting: The E.164 Standard

The single most common reason WhatsApp click-to-chat links fail with the error "The phone number shared via url is invalid" is incorrect number formatting.

Strict Formatting Rules:

  1. Omit any leading +: Write 14155552671, NOT +14155552671.
  2. Omit any national exit codes or trunk prefixes: For example, UK numbers start with 07... locally. In international format, drop the leading 0 and prepend country code 44: 447123456789, NOT 4407123456789.
  3. Omit all dashes, spaces, and brackets: Strip -, (, ), and spaces completely.
Country Local Display Format Correct wa.me Format Common Incorrect Attempt
United States (415) 555-2671 14155552671 +1 (415) 555-2671
United Kingdom 07911 123456 447911123456 4407911123456
Germany 0151 12345678 4915112345678 +49 151 12345678
Brazil (11) 98765-4321 5511987654321 +55 (11) 98765-4321
India 98765 43210 919876543210 +91 98765-43210

To verify and validate phone numbers before launching campaigns, use our free WhatsApp Number Validator.


3. Encoding Pre-filled Messages (Line Breaks, Emojis, and Markdown)

Pre-filled messages dramatically increase conversion rates by eliminating "blank page anxiety" for the customer.

Because query parameters in URLs must adhere to RFC 3986, special characters must be percent-encoded:

  • Space: %20 (or +)
  • Line break (\n): %0A
  • Question mark (?): %3F
  • Ampersand (&): %26

Example: Multi-line Order Inquiry with Emojis

Suppose you want the pre-filled message to read:

👋 Hi! I want to order:
- Item: Silk Shirt (Size M)
- Shipping: Express

Encoded URL:

https://wa.me/14155552671?text=%F0%9F%91%8B%20Hi!%20I%20want%20to%20order%3A%0A-%20Item%3A%20Silk%20Shirt%20(Size%20M)%0A-%20Shipping%3A%20Express

To easily compose, format, and preview styled messages with WhatsApp bold (*text*), italics (_text_), and strikethrough (~text~), check out our WhatsApp Message Formatter.


4. Generating QR Codes for Physical Media and Packaging

Click-to-chat links don't just live on websites. When printed as QR codes on:

  • Product packaging and user manuals
  • Restaurant table tents and menus
  • Print flyers, trade show booths, and receipts

...they allow customers to scan with their camera app and jump straight into your WhatsApp support queue.

You can instantly generate high-resolution print-ready SVG and PNG QR codes with your brand logo using our WhatsApp Contact QR Generator.


5. Summary & Best Practices Checklist

Before deploying any click-to-chat link in production:

  • Number contains only numeric digits (no +, dashes, or spaces).
  • National trunk prefix (0) is stripped.
  • Text parameter is properly URL-encoded (especially %0A for line breaks).
  • Tested on both iOS (Safari) and Android (Chrome).
  • Campaign tracked with UTM tags or link tracking if running paid ads.

To create links automatically with an interactive live preview, use the free WAButton WhatsApp Link Generator.

W

Written by WAButton Technical Team

Developer Relations

Related Playbooks & Resources

Expand your WhatsApp conversion strategy with these companion guides.

Tomorrow's conversations are already visiting your website today.

The opportunity isn't only getting more visitors. It's connecting with the ones you already have, before their interest fades.

One line of code. No credit card. No waiting.