WhatsApp and Markdown-ish?

Posted: | Updated: | Tags: status

Markdown is a neat and simple way to format text using a basic editor. You’ll have come across it on various different forums, instant messaging apps, and blogging platforms among other places where text fields are used. It was created by John Gruber in 2004 and had then been adopted across different platforms but lacked a standardised implementation. To address these inconsistencies, Jeff Atwood, John MacFarlane, and others have formed a group in an effort to standardise. Since 2014, text/markdown is now a recognized MIME type, and CommonMark was released which is the specification and test suite we need!

CommonMark has been adopted on many platforms and programming libraries since. Many do not mean all, so why this post? It’s WhatsApp. The reason I started looking into Markdown and its specifications was WhatsApp. I strongly dislike that WhatsApp breaks from the specification for bold text. As per the spec:

Markdown treats asterisks (*) and underscores (_) as indicators of emphasis. Text wrapped with one * or _ will be wrapped with an HTML <em> tag; double *’s or _’s will be wrapped with an HTML <strong> tag.

This means text written like *this* or _this_ in Markdown will be translated to this, italicised. Whereas text is written like **this** or __this__ will appear like this, in bold.

WhatsApp, rubbing against the grain, only permits text wrapped with a single asterisk to be bold, while text wrapped in a single underscore to be italics. I wanted to compare this to other messaging platforms and so created the following table. It is not an extensive list of all supported options for each platform, as Slack, Discord, and Telegram have some more.


Markdown1WhatsApp2Slack3Discord4Telegram5
Heading 1# text# text
Heading 2## text## text
Heading 3### text### text
Heading 4#### text
Heading 5##### text
Heading 6###### text
Bold**text** or __text__*text**text* or **text****text****text**
Italic*text* or _text__text__text_ or __text___text___text__
Blockquotes> text> text6> text> text
Ordered lists1. text1. text61. text
Unordered lists- text or * text- text or * text6* text- text or * text
Code`text``text`6`text``text``text`
Code blocks```text ``` (extended)```text``````text``````text``````text```
Links[text](http://example.com)[text](http://example.com)[text](http://example.com/)
Strikethroughtexttext~~text~~~~text~~

It was WhatsApp divergence from the standard that prompted me to create this comparison but as shown in the table, there are other offenders! Take for instance Telegram, the messaging service only permits double underscores to be italics. I could find a concrete reason why these applications chose to implement Markdown this way but would be interested to see if others have similar examples.


  1. CommonMark Spec spec.commonmark.org ↩︎

  2. WhatsApp - How to format your messages faq.whatsapp.com ↩︎

  3. Slack - Format your messages slack.com ↩︎

  4. Discord - Markdown Text 101 (Chat Formatting: Bold, Italic, Underline) support.discord.com ↩︎

  5. Telgram - MarkdownV2 style core.telegram.org ↩︎

  6. Update 2023-12-17: I’ve just stumbled on some new supported syntax, these apply for blockquotes, ordered and unordered lists and code. The WhatsApp FAQ has been updated to read “New text formatting is only available on iOS and Web.” I’ve confirmed on my Android phone I can simply see the plaintext version if any of the new formatting is used. ↩︎ ↩︎ ↩︎ ↩︎


Related ramblings