I put a product link with ?id=5&c=red inside a WhatsApp message link, and it gets cut at the &. How do I encode it?
Inside the text parameter of a wa.me link, the & in your product link looks like the start of a new parameter, so everything after it is lost. Encode the product link in 'Component' mode, which also encodes : / ? & and =, then place the result in the message. The tool notes that you are encoding a full URL in this mode, so you know it is intended.
What the WhatsApp link sees when you paste your link as it is
We built a chat link with the product link dropped in unencoded, then pasted it into the tool to see its parts table:
https://wa.me/966500000000?text=https://example.com/p?id=5&c=red
The 'Query parameters' table showed two parameters, not one: text with the value https://example.com/p?id=5, then a separate parameter c with the value red. So the message the customer sees stops at id=5, and the colour part went somewhere else. If your product page needs c=red to show the red variant, the customer lands on the default one.
The correct encoding
We encoded the product link on its own in 'Component' mode and got:
https%3A%2F%2Fexample.com%2Fp%3Fid%3D5%26c%3Dred
Every structural character became a code: : is %3A, / is %2F, ? is %3F, = is %3D and & is %26. A note under the output said the text is a full URL and you are in 'Component' mode, which is exactly what you want here, because it will be a value inside another link.
With that output placed after text= and the whole chat link pasted back in, the table showed a single parameter, text, whose decoded value is the full product link including &c=red.
Steps
- Open the URL encoder/decoder, choose 'Encode', then 'Component'.
- Paste the product link alone, not the whole chat link.
- Copy the output and put it after ?text= in the wa.me link.
- To check, paste the final chat link into the tool with 'Decode' and confirm the parameters table shows one parameter named text.
What if the message has words before the link?
Encode the whole message in one go, words and link together, in the same mode. We tried 'شوف المنتج: ' (see the product:) followed by the link: the Arabic letters, colon and spaces were encoded, and the link inside was encoded the same way. What matters is encoding the full value once, not encoding the link and then encoding the message that contains it again, which gives you double encoding with %25 in it.
Why 'Full URL' mode is not enough
Because 'Full URL' mode is designed to keep a link openable, so it leaves &, = and ? alone. We encoded the same product link in that mode and it came out unchanged, which is exactly what causes the cut. The rule: a link you will open directly, 'Full URL'; a link you will put inside another link, 'Component'.
If you build chat links often, the WhatsApp link generator encodes the whole message text, including any link inside it, with no extra steps.
Common questions
Will the customer see a normal link?
Yes. WhatsApp decodes the message before showing it, so the customer sees the product link in its usual form.
Does this apply to links other than WhatsApp?
Yes, to any link placed as a value inside another link, such as redirect links.
Why did a note appear when encoding?
Because encoding a full URL in 'Component' mode means it will not work on its own. The note reminds you, and here that is intended.
