Skip to content

WhatsApp Text Formatting

Also called: WhatsApp markdown · WhatsApp message formatting · Bold text on WhatsApp

Definition
The markup WhatsApp renders in message text, such as asterisks for bold, underscores for italic, tildes for strikethrough and backticks for code.

Exhibit A

Put formatting into a click-to-chat link

A wa.me link opens a WhatsApp chat with a number, optionally with a pre-filled message.

Try

Format: number | message

Click-to-chat link
https://wa.me/919876543210?text=Hi%2C%20I'd%20like%20*2%20kg*%20of%20_Alphonso_%20mangoes
Number
+919876543210
Encoded text
57 chars
  • Assumed the digits already begin with a country code and added the +.
  • wa.me takes the full international number as digits only — no +, no 00, no spaces.
  • The message was URL-encoded (41 characters → 57) and pre-fills the chat; the customer still presses Send.
Formatting is plain characters, so it travels anywhere text goes. Build a wa.me link whose pre-filled message uses WhatsApp markup: asterisks, underscores and tildes pass through, while backticks and line breaks become %60 and %0A.

What is WhatsApp text formatting?

WhatsApp text formatting is the lightweight markup the WhatsApp app turns into styled text. A word wrapped in asterisks shows as bold, underscores give italic, tildes give strikethrough and three backticks give monospace. There is no rich-text field and no HTML: the markers are ordinary characters inside the message, and each recipient's app renders them when it draws the chat. The same rules apply whether a person types the message or a business sends it through the WhatsApp Business Platform.

In 2024 WhatsApp added line-level formats. A line that starts with * or - becomes a bulleted list item, 1. starts a numbered list, > makes a block quote, and a single pair of backticks marks inline code. Styles combine when the markers nest cleanly, such as *_urgent_* for bold italic, and a marker only works when it touches the text: * sale * with spaces inside is shown with its asterisks.

For developers, formatting is just part of the string. You put the markup in a text message's text.body, in a media caption, in an interactive message's body or in a template body, and write line breaks as \n in the JSON. Formatting is separate from length — the markers count towards the 4,096-character text body and the 1,024-character template body covered under message character limits — and it is not Markdown: **bold**, # headings and [links](url) are not WhatsApp syntax.

Key takeaways

  • WhatsApp text formatting is plain-character markup: *bold*, _italic_, ~strikethrough~ and ``monospace`` that the app renders on screen.
  • WhatsApp also renders bulleted and numbered lists, block quotes and inline code, added in 2024 and typed at the start of a line or in single backticks.
  • Over the API the markup is just characters in text.body, a caption or a template body; use \n in the JSON for line breaks.
  • Meta asks for no Markdown special characters in template text headers, so keep emphasis in the body.
  • The markers are ordinary characters and count towards limits: 4,096 for a text body, 1,024 for a template body.

How does WhatsApp text formatting work?

  1. Pick one thing to emphasise

    Bold the fact the customer must act on, such as an amount, a date or an order number. Use italic for asides, strikethrough for a replaced value and monospace for codes and reference IDs.

  2. Wrap it with no inner spaces

    Write *Order #4521*, not * Order #4521 *. Keep each styled span on one line, and close nested markers in reverse order: *_like this_*.

  3. Start lines for lists and quotes

    Begin a line with - or * for bullets, 1. for numbered steps or > for a quote, and separate lines with \n. A blank line (\n\n) is the only spacing control there is.

  4. Send it as ordinary text

    Put the markup in text.body, image.caption, interactive.body.text or a template's BODY component. No flag turns formatting on; the Cloud API passes the characters through unchanged.

  5. Check it on real phones

    The recipient's app does the rendering. Test a new template or bot reply on Android, iOS and WhatsApp Web before it goes to customers, especially when it uses lists or quotes.

Example: A packed-order reply from a Surat textile shop

A customer asks a Surat saree shop whether her order is ready. The agent replies inside the window with: "*Order #4521 is packed*" on the first line, then "- 2 Banarasi sarees" and "- 1 dupatta" as a bulleted list, "_Ring Road store, after 4 pm_" in italic, and "> Show this message at the counter" as a quote, with the pickup code in backticks. On her phone the order number is bold and the items line up as bullets. An earlier draft written by a new bot had used **Order packed** from its Markdown training; the shop's test send to a staff phone showed the extra asterisks, and the team added a converter before the bot went live.

WhatsApp text formatting in code

curl -X POST "https://graph.facebook.com/v26.0/{PHONE_NUMBER_ID}/messages" \
-H "Authorization: Bearer {ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"messaging_product": "whatsapp",
"to": "919812345678",
"type": "text",
"text": {
"body": "*Order #4521 is packed*\n\n- 2 Banarasi sarees\n- 1 dupatta\n\nPickup: _Ring Road store, after 4 pm_\n> Show this message at the counter\nCode: `PK4521`"
}
}'

Formatting is part of the string: asterisks, underscores, list dashes and a quote marker, with \n for each line break.

Common mistakes with WhatsApp text formatting

  • Sending Markdown from an LLM or CMS

    **bold**, # Heading and [text](url) are not WhatsApp syntax, so customers see stray symbols. Convert Markdown to WhatsApp markup in the send path, not by hand.

  • Spaces inside the markers

    * Diwali sale * shows its asterisks. The opening and closing markers must touch the text, and a styled span should not break across lines.

  • Formatting in headers and buttons

    Meta asks for no Markdown special characters in template text headers, and button labels and list rows are not the place for markup. Put emphasis in the body.

  • Bolding everything

    When every line is bold nothing stands out, and the message looks promotional. Emphasise one or two facts per message and let line breaks do the rest.

  • Forgetting the markers count

    Asterisks, underscores and backticks are characters like any other. A template body written right up to 1,024 characters goes over the limit once formatting is added.

Why does WhatsApp text formatting matter?

Formatting is the only typographic control a business has inside a WhatsApp bubble. Used sparingly, it makes an order number, a due date or a warning about sharing an OTP stand out in a dense message, and lists make multi-step instructions readable on a small screen. Used carelessly, it shows customers stray asterisks or turns a reminder into a wall of bold that reads like spam, which costs replies and, over time, quality rating.

Best practices for WhatsApp text formatting

  • Bold the one thing the customer must act on: the amount due, the date or the order number.
  • Use a blank line between sections; WhatsApp has no other spacing control.
  • Put codes and reference IDs in monospace so similar characters such as 0 and O are easier to tell apart.
  • Keep a plain-text version for SMS fallback and strip the markers there.
  • Test every new template and bot reply on Android, iOS and WhatsApp Web before it goes live.

WhatsApp Text Formatting FAQs

How do I make text bold in a WhatsApp API message?+
Wrap it in single asterisks inside the message text, like `*Order shipped*`. There is no separate bold field: the Cloud API passes the characters through and the recipient's WhatsApp app renders them as bold. This works in text bodies, captions, interactive bodies and template bodies.
Can I use formatting in WhatsApp message templates?+
Yes, in the body. Template body text uses the same markup as ordinary messages, so `*bold*` and `_italic_` render once the template is delivered. Meta asks that text headers contain no Markdown special characters, so keep emphasis in the body rather than the header.
Why does my WhatsApp message show asterisks instead of bold?+
Usually because the markers do not touch the text or are not WhatsApp syntax. `* sale *` with inner spaces and Markdown's `**bold**` are shown literally, as is a span broken across lines. Write `*sale*` with no spaces and keep each styled span on one line.
Does WhatsApp support headings, underline or colours?+
No. WhatsApp formatting covers bold, italic, strikethrough, monospace, inline code, lists and quotes only. There are no headings, underline, colours or font sizes; for visual structure use a template header, a media header or line breaks.
Do formatting characters count towards the WhatsApp character limit?+
Yes. The asterisks, underscores and backticks are ordinary characters, so they count towards the 4,096-character limit of a text body and the 1,024-character limit of a template body.

See InfiQ pricing

Try it on the official WhatsApp Business API

InfiQ is an official Meta Business Partner. Start a 7-day free trial — no card needed — and see this running on your own number.