# brucedown

> A near-perfect GitHub style Markdown to HTML converter

Latest version **2.0.17** (published 2026-08-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install brucedown
pnpm add brucedown
yarn add brucedown
bun add brucedown
```

Provides the command `brucedown`.

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.0.17 |
| Published | 2026-08-03 |
| First published | 2012-09-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 28.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 29 |
| Author | Rod Vagg |
| Maintainers | rvagg |
| Keywords | markdown, gfm, github, html |

## Links

- npm: https://www.npmjs.com/package/brucedown
- Repository: https://github.com/rvagg/brucedown
- Homepage: https://github.com/rvagg/brucedown#readme
- Issues: https://github.com/rvagg/brucedown/issues
- npm.io page: https://npm.io/package/brucedown

## Dependencies (3)

- [shiki](https://npm.io/package/shiki.md) ^4.0.2
- [marked](https://npm.io/package/marked.md) ^18.0.0
- [marked-gfm-heading-id](https://npm.io/package/marked-gfm-heading-id.md) ^4.1.3

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 2.0.17 (latest) — 2026-08-03
- 2.0.16 — 2026-08-03
- 2.0.15 — 2026-08-03
- 2.0.14 — 2026-07-30
- 2.0.13 — 2026-07-29
- 2.0.12 — 2026-07-27
- 2.0.11 — 2026-07-21
- 2.0.10 — 2026-07-20
- 2.0.9 — 2026-07-06
- 2.0.8 — 2026-06-29
- 2.0.7 — 2026-06-22
- 2.0.6 — 2026-04-20
- 2.0.5 — 2026-03-30
- 2.0.4 — 2026-03-09
- 2.0.3 — 2026-01-26
- … 14 more at https://npm.io/package/brucedown/versions

## README

# Brucedown

**A bonza GitHub-style Markdown to HTML converter**

[![CI](https://github.com/rvagg/brucedown/actions/workflows/test-and-release.yml/badge.svg)](https://github.com/rvagg/brucedown/actions/workflows/test-and-release.yml)

[![NPM](https://nodei.co/npm/brucedown.svg?style=flat&data=n,v&color=blue)](https://nodei.co/npm/brucedown/)

Converts GitHub Flavoured Markdown (GFM) to HTML with syntax highlighting powered by [Shiki](https://shiki.style/) (the same highlighting engine used by VS Code).

## Installation

```bash
npm install brucedown
```

## Usage

### As a module

```javascript
import brucedown from 'brucedown'

const markdown = `
# G'day World

Some **bold** text and \`inline code\`.

\`\`\`javascript
const greeting = "G'day!";
console.log(greeting);
\`\`\`
`

const html = await brucedown(markdown)
console.log(html)
```

### With options

```javascript
import brucedown from 'brucedown'

const html = await brucedown(markdown, {
  theme: 'github-dark'  // Any Shiki theme
})
```

### CLI

```bash
brucedown input.md output.html
brucedown input.md > output.html
```

### Cleanup

If you're processing heaps of files in a long-running process and want to free resources when done:

```javascript
import brucedown, { dispose } from 'brucedown'

// Process your files...
const html = await brucedown(markdown)

// Release Shiki's WASM/grammar resources
dispose()
```

For CLI usage or short-lived processes, this isn't necessary - process exit handles cleanup.

## Features

- **GitHub Flavoured Markdown** - Tables, strikethrough, task lists, autolinks
- **Syntax Highlighting** - Powered by Shiki with VS Code-quality highlighting
- **200+ Languages** - All languages supported by VS Code
- **Multiple Themes** - Any VS Code theme (`github-light`, `github-dark`, `one-dark-pro`, etc.)
- **Browser & Node.js** - Works in both environments

## API

### `brucedown(markdown, [options])`

Converts markdown to HTML.

- `markdown` (string) - The markdown source
- `options` (object, optional)
  - `theme` (string) - Shiki theme name (default: `'github-light'`)

Returns: `Promise<string>` - The resulting HTML

### `dispose()`

Releases Shiki's WASM and grammar resources. Only needed for long-running processes; CLI usage doesn't require this.

## Licence

MIT Licence. Copyright (c) Rod Vagg.

---
_Source: https://npm.io/package/brucedown · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
