# markdown - Liquid Filter Reference

Source: https://support.storeconnect.com/articles/markdown-filter-reference · Last modified 21 August 2026

## Description

Converts a Markdown string to HTML using GitHub-Flavored Markdown (GFM). The output is sanitized using an HTML allowlist — only permitted tags and attributes pass through; all others are stripped.

**Permitted HTML tags:** `p`, `br`, `h1`–`h6`, `ul`, `ol`, `li`, `a`, `strong`, `em`, `code`, `pre`, `blockquote`, `table`, `thead`, `tbody`, `tr`, `th`, `td`, `hr`, `del`, `img`, `span`, `div`

**Permitted HTML attributes:** `href`, `src`, `alt`, `title`, `id`, `class`, `lang`

| Property | Value |
|----------|-------|
| **Return Type** | String (HTML) |
| **Category** | Text |

## Syntax


```liquid

{{ string | markdown }}
```


## Supported Markdown features

- Headings (`#` through `######`, with auto-generated IDs)
- Bold (`**text**`), italic (`*text*`), strikethrough (`~~text~~`)
- Inline code (`` `code` ``) and fenced code blocks with optional language
- Links and images
- Ordered and unordered lists (with nesting)
- Blockquotes
- Tables
- Horizontal rules

## Examples

### Inline formatting


```liquid

{{ "This is **bold**, *italic*, and `inline code`." | markdown }}
```


**Output:**

```html

<p>This is <strong>bold</strong>, <em>italic</em>, and <code>inline code</code>.</p>
```

### Headings


```liquid

{{ "# Page title" | markdown }}
```


**Output:**

```html

<h1 id="page-title">Page title</h1>
```

### Links


```liquid

{{ "[Visit our store](https://example.com)" | markdown }}
```


**Output:**

```html

<p><a href="https://example.com">Visit our store</a></p>
```

### Unordered list


```liquid

{{ "- Item 1\n- Item 2\n- Item 3" | markdown }}
```


**Output:**

```html

<ul>
  <li>Item 1</li>
  <li>Item 2</li>
  <li>Item 3</li>
</ul>
```

### Ordered list


```liquid

{{ "1. First\n2. Second\n3. Third" | markdown }}
```


**Output:**

```html

<ol>
  <li>First</li>
  <li>Second</li>
  <li>Third</li>
</ol>
```

### Using a Liquid variable


```liquid

{% assign description = product.s_c__description__c %}
{{ description | markdown }}
```


:::note
If the input is `nil` or an empty string, the filter returns an empty string.
:::

---

## Follow StoreConnect

- [Email Newsletter](https://getstoreconnect.com/c/lp-newsletter)
- [LinkedIn Newsletter](https://www.linkedin.com/build-relation/newsletter-follow?entityUrn=7444956928444862464)
- [YouTube](https://www.youtube.com/channel/UCngKdP2x8l1wcbAKW3tvU8g)
- [LinkedIn](https://www.linkedin.com/company/storeconnect)
- [X / Twitter](https://x.com/storeconnecthq)

## Popular Links

- [Partners](https://getstoreconnect.com/partners)
- [News](https://getstoreconnect.com/articles/news)
- [Events](https://getstoreconnect.com/articles/events)
- [Feature Comparison](https://getstoreconnect.com/how-we-compare)
- [Download a free trial](https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000FMkeKUAT)
- [Book a Demo](https://getstoreconnect.com/contact)

## Documentation

- [Help documentation](https://support.storeconnect.com/help-documentation)
- [AI agents](https://support.storeconnect.com/ai)
- [Videos & tutorials](https://support.storeconnect.com/videos-tutorials)
- [Developer reference](https://support.storeconnect.com/developer-reference)
- [Release notes](https://support.storeconnect.com/release-notes)
- [Troubleshooting](https://support.storeconnect.com/troubleshooting)
- [Trust Center](https://trust.getstoreconnect.com/)
- [Status Page](https://status.storeconnect.com/)

## Contact

- info@getstoreconnect.com
- US +1 415 745 3230
- AUS +61 2 8365 2308

100 S Ashley Dr, Suite 600-2461
Tampa FL 33602-600 USA

Level 22, Sydney Place
180 George Street
Sydney, NSW, 2000, AUS

---

StoreConnect Support — https://support.storeconnect.com/articles/markdown-filter-reference