# Introducing datocms/structured-text-to-markdown

[date: 2025-10-02T09:20:51.987+02:00]

You can now turn Structured Text fields back into Markdown with our new [`datocms/structured-text-to-markdown`](https://github.com/datocms/structured-text/tree/main/packages/to-markdown) package. Perfect if you need clean Markdown output for your pipelines, exports, or tooling (or just a clean .md page for all the LLMs 🤭).

Just a lil

Terminal window

```bash
npm install datocms/structured-text-to-markdown
```

and you're set!

The renderer supports all DatoCMS Structured Text nodes and converts them to CommonMark-compatible Markdown:

**Block Nodes**

-   **Headings**: `# H1` through `###### H6`
-   **Paragraphs**: Plain text with double newlines
    
-   **Lists**: Both unordered (`-`) and ordered (`1.`) lists with nested support
-   **Blockquotes**: Lines prefixed with `>`
    
-   **Code blocks**: Fenced code blocks with language support
-   **Thematic breaks**: Horizontal rules (`---`)
    

**Inline Formatting**

-   **Strong**: `**bold**`
-   **Emphasis**: `*italic*`
    
-   **Code**: `` `code` ``
-   **Strikethrough**: `~~text~~`
    
-   **Highlight**: `==text==` (extended Markdown)
-   **Underline**: `<u>text</u>` (HTML fallback, no native Markdown)
    

**Links**

-   **Regular links**: `[text](url)`
-   **Record links**: Custom rendering via `renderLinkToRecord`
    

Full deets on the package and advanced usage are [on the README](https://github.com/datocms/structured-text/blob/main/packages/to-markdown/README.md).