The Markdown engine for the modern web

One parser, every renderer. Component syntax, attributes, plugins, and streaming, with decoupled parsing you can run on the server, the client, or mid-stream.

source.md
# Hello World

A **high-performance** markdown parser with _streaming_ support.

## Features

- Parse markdown in real-time
- Vue, React, Svelte, and Angular components
- Auto-close incomplete syntax

::callout{color="info" icon="i-lucide-info"}
Comark handles **components in markdown** natively.
::

> Built for modern web applications.

```ts [example.ts]
import { parse } from 'comark'

const tree = await parse('# Hello **World**')
rendered output

Hello World

A high-performance markdown parser with streaming support.

Features

  • Parse markdown in real-time
  • Vue, React, Svelte, and Angular components
  • Auto-close incomplete syntax
Comark handles components in markdown natively.
Built for modern web applications.
example.ts
import { parse } from 'comark'

const tree = await parse('# Hello **World**')

Markdown as data, not code

Component syntax stays in plain text. Parsing happens at build time or runtime, your choice, and works across any renderer. Built on five years of MDC, the parser behind Nuxt Content.

Real-time streaming

Parse content as it arrives. Built for AI chat interfaces and progressive loading.

Learn more

Vue, React, Svelte & Angular

Embed custom components in your Markdown and render them natively in Vue, React, Svelte and Angular.

<script setup lang="ts">
import { Comark } from '@comark/vue'
import Alert from './components/Alert.vue'

const md = `
# Hello **World**

::alert{type="info"}
This is a Comark component!
::
`
</script>

<template>
  <Suspense>
    <Comark :components="{ Alert }">
      {{ md }}
    </Comark>
  </Suspense>
</template>

Auto-close

Incomplete markdown syntax is automatically closed during streaming, so content renders correctly at every frame.

Learn more
Bold
source
rendered output

Extensible plugins

Extend Comark with plugins for math formulas, syntax highlighting, and more. You can also reuse any markdown-it plugin.

LaTeX math formulas with KaTeX. Inline $...$ and display $$...$$ syntax.

Browse all plugins
source
rendered output

The area of a circle is A=πr2A = \pi r^2.

Euler's identity:

eiπ+1=0e^{i\pi} + 1 = 0

From Markdown to UI

Install Comark, pick a renderer, and render your first component in minutes.