How to Use Mastodon Markdown-Like Formatting Where Supported
🔍 WiseChecker

How to Use Mastodon Markdown-Like Formatting Where Supported

Mastodon does not support full Markdown everywhere, but many instances and client apps offer Markdown-like formatting for posts and profile fields. Users often try to use asterisks or underscores for bold and italic text, only to see the raw characters appear instead of formatted content. This happens because Mastodon uses a different syntax — HTML subset or custom markup — depending on the software version and instance settings. This article explains exactly where formatting works, how to apply it, and what to avoid.

Key Takeaways: Mastodon Text Formatting

  • HTML tags in post content: Use <b>, <i>, <a>, and <span> for bold, italic, links, and inline styling where the instance allows HTML.
  • Profile bio and fields: Plain text only — no Markdown or HTML rendering in the web interface.
  • Client apps with Markdown support: Apps like Tusky and Fedilab interpret Markdown syntax such as bold and italic before posting.

ADVERTISEMENT

How Mastodon Handles Formatting Compared to True Markdown

Mastodon was built as a microblogging platform where posts are short and plain text is the default. The core software does not include a Markdown parser for post content. Instead, Mastodon uses a custom text processor that strips most HTML tags for security — it only allows a small whitelist of safe HTML elements. This whitelist typically includes <b>, <i>, <a>, <span>, and <br>. The goal is to prevent script injection and layout breaking while still giving users basic text control.

Many third-party Mastodon client apps, however, implement their own Markdown support. These apps convert Markdown syntax to HTML before sending the post to the Mastodon server. The server then applies its HTML whitelist, which means the formatted output may be stripped if the app uses tags not in the whitelist. Profile fields — your display name, bio, and profile metadata — are rendered as plain text in the official web interface and most clients. No formatting is applied there.

Mastodon instances can also enable the glitch-soc fork or custom themes that add Markdown rendering. Glitch-soc, a popular Mastodon fork, includes a Markdown option in user settings. When enabled, posts are processed with a Markdown parser before being stored. This is not available on standard Mastodon servers. You must check with your instance admin or look for a “Markdown” toggle in your preferences.

Applying Formatting in Mastodon Posts

The exact method depends on your instance software and the client you use. Follow the steps for your situation.

Method 1: Using HTML Tags on a Standard Mastodon Instance

  1. Open the web interface or your client app.
    Use a browser or a client that sends raw HTML — most official clients and web UIs do this.
  2. Type your post content with HTML tags.
    For bold text, wrap the word or phrase in <b> and </b>. For italic, use <i> and </i>. For a link, use <a href="URL">link text</a>. Example: This is <b>bold</b> and this is <i>italic</i>.
  3. Post the message.
    The server processes the HTML and renders the formatting for other users who see the post in their timeline. Users on clients that strip HTML will see the raw tags — this is rare on modern clients.
  4. Check the result.
    View your post on the web interface or in another client. The bold and italic text should appear formatted.

Method 2: Using Markdown Syntax in a Supported Client App

  1. Install a client with Markdown support.
    Examples include Tusky for Android and Fedilab for Android. On iOS, apps like Toot! or Ivory may offer Markdown options — check their settings.
  2. Enable Markdown in the app settings.
    In Tusky, go to Preferences > Posting > Markdown formatting and toggle it on. In Fedilab, go to Settings > Post > Markdown.
  3. Write your post using standard Markdown syntax.
    Use double asterisks for bold: bold text. Use single asterisks for italic: italic text. Use backticks for inline code: `code`. Use hash symbols for headings: # Heading.
  4. Post the message.
    The app converts Markdown to HTML before sending. The server then applies its HTML whitelist. Most common tags survive this process.
  5. Verify the output.
    Open the post in the web interface or another client. If the app used tags not in the whitelist — for example, <h1> — the server may strip them, leaving plain text.

Method 3: Using Markdown on a Glitch-Soc Instance

  1. Log in to your glitch-soc instance.
    Glitch-soc instances often have “glitch” in the domain name or are listed on joinmastodon.org with the glitch-soc software label.
  2. Open your preferences.
    Click the gear icon (Preferences) in the web interface.
  3. Enable Markdown rendering.
    Under Preferences > Posting, look for a checkbox labeled “Markdown formatting” or “Enable Markdown in posts.” Check it and save.
  4. Write your post with Markdown syntax.
    Use the same syntax as Method 2. The server parses the Markdown and stores the HTML output.
  5. Post and confirm.
    The post appears formatted for all users, regardless of their client, because the server already processed the Markdown.

ADVERTISEMENT

Common Formatting Mistakes and Limitations

Raw Asterisks or Underscores Appear in the Post

This is the most frequent issue. If you type italic on a standard Mastodon instance without a Markdown client, the server treats the asterisks as literal characters. The same happens with underscores. To fix this, use HTML tags <i> and <b> directly, or switch to a client that converts Markdown before posting.

Headings and Code Blocks Are Stripped or Broken

Mastodon’s HTML whitelist does not include <h1> through <h6> or <pre> and <code> for block elements. If you use Markdown headings or fenced code blocks in a client app, the server will strip those tags. The text remains but loses all formatting. For inline code, use backticks in a Markdown client — the client converts them to <code> tags, which are in the whitelist on many instances. Check your instance by posting a test with <code>test</code>.

Profile Bio and Fields Never Show Formatting

The web interface and official mobile apps render profile bio and metadata fields as plain text. Even if you paste HTML or Markdown there, it appears as raw text. Some custom front-ends or alternative clients may render HTML in bios, but this is not standard. To add emphasis in your bio, use emoji or line breaks — line breaks are preserved in plain text fields on most clients.

Formatting Disappears After Editing a Post

When you edit a post on Mastodon, the server re-processes the content. If you originally used HTML tags, the edit dialog may show the raw tags, and you must re-enter them. Some clients lose Markdown conversion after editing. To avoid this, always re-apply formatting when editing.

Standard Mastodon vs Glitch-Soc vs Client App Markdown

Item Standard Mastodon Glitch-Soc Fork Client App Markdown
Default formatting method HTML whitelist tags Markdown or HTML (user choice) Markdown converted to HTML
Bold text <b>text</b> text or <b> text converted to <b>
Italic text <i>text</i> text or <i> text converted to <i>
Headings Not supported Supported via Markdown Supported only if client converts to whitelisted tags
Inline code <code>text</code> (if instance allows) Backticks or <code> Backticks converted to <code>
Profile bio formatting None None None (plain text only)

Mastodon’s formatting system is intentionally limited to keep posts secure and consistent across clients. You can now apply bold, italic, and links in your posts using HTML tags where the instance supports them. For more advanced formatting like headings and code blocks, consider joining a glitch-soc instance or using a Markdown-capable client app. Remember that profile fields never render formatting in the official interface, so use plain text with line breaks or emoji for visual emphasis.

ADVERTISEMENT