# Install md4c with Homebrew, apk, apt, dnf, MacPorts, Nix, pacman, zypper

C Markdown parser. Fast. SAX-like interface. Version 0.5.3 via Homebrew; verified 2026-04-20.

## Install

```sh
sudo av install brew:md4c
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install md4c
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install md4c
```

  Evidence: MacPorts ports tree: devel/md4c/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add md4c
```

  Evidence: Alpine Linux edge package indexes: md4c from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install libmd4c-dev
```

  Evidence: Debian stable package indexes: libmd4c-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install md4c
```

  Evidence: Fedora Rawhide package metadata: md4c from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#md4c
```

  Evidence: nixpkgs package indexes: pkgs/by-name/md/md4c/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S md4c
```

  Evidence: Arch Linux sync databases: md4c from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install libmd4c0
```

  Evidence: openSUSE Tumbleweed package metadata: libmd4c0 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

## Package facts

- **Package key:** brew:md4c
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/md4c>
- **Version:** 0.5.3
- **Source summary:** C Markdown parser. Fast. SAX-like interface
- **Homepage:** <https://github.com/mity/md4c>
- **Repository:** <https://github.com/mity/md4c>
- **Upstream docs:** <https://github.com/mity/md4c#readme>
- **License:** MIT
- **Source archive:** <https://github.com/mity/md4c/archive/refs/tags/release-0.5.3.tar.gz>
- **Last updated:** 2026-04-20T18:43:41Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- md2html (cli)
- md2html (alias)

## Build dependencies

- cmake

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 0.5.3
- Package-manager updated: 2026-04-20
- Local data: ok
- Upstream repository: https://github.com/mity/md4c
- info: No cached GitHub release or tag data was available.
## Project history and usage

MD4C is a Markdown parser implementation in C. The upstream README expands the name as Markdown for C and presents the project as a CommonMark-oriented, embeddable parser with a SAX-like callback API and an optional HTML renderer.

### Project history

The GitHub repository was created on 2016-10-03, and the project has continued as a small C library centered on a compact parser surface: the README emphasizes that the parser is implemented in one source file and one header file, with no dependencies beyond the standard C library.

MD4C's design grew around CommonMark compatibility, extension flags, and predictable performance. The upstream documentation says it targets CommonMark 0.31, supports common extensions such as tables, task lists, footnotes, strikethrough, math spans, wikilinks, and admonitions, and exposes both parser callbacks and a separate Markdown-to-HTML API.

### Adoption history

The package-manager metadata supplied for this batch shows MD4C packaged across Homebrew, Debian/Ubuntu, Fedora, Alpine, Arch, MacPorts, Nix, and openSUSE. That breadth fits its role as a small C dependency that distributions can ship both as a library and as the `md2html` command.

The upstream repository tags include a long 0.x release series through release-0.5.3, indicating a project that has remained versioned and maintained after its initial public repository appeared in 2016.

### How it is used

Library users include `md4c.h` and call `md_parse()` with callbacks for block, span, and text events. Applications that only need HTML can link the HTML renderer and call `md_html()`, receiving chunks of generated HTML through a callback.

The command-line packaging commonly exposes `md2html`, making MD4C useful both as a library dependency and as a quick Unix-style Markdown-to-HTML converter.

### Why package nerds care

Package maintainers care about MD4C because it is a small, dependency-light C implementation of a common document parsing problem. The README explicitly contrasts it with DOM-style parsers and emphasizes embedding, compactness, portability, and resistance to pathological parsing inputs.

Its package appeal is also practical: it gives C and C++ projects a permissively licensed CommonMark parser without vendoring a larger Markdown stack or depending on a language runtime.

### Timeline

- 2016-10-03: Official GitHub repository created.
- 0.2.x-0.5.x: Upstream release tags show a continuing versioned 0.x series.
- 2026: Upstream README states compliance with CommonMark 0.31.

### Related projects

- CommonMark defines the Markdown specification target named by the MD4C README.
- The MD4C README compares its callback-oriented model with DOM-style Markdown parsers and documents an optional `md4c-html` renderer.

### Sources

- <https://api.github.com/repos/mity/md4c>
- <https://api.github.com/repos/mity/md4c/tags?per_page=30>
- <https://github.com/mity/md4c#readme>
- <https://github.com/mity/md4c/wiki>
- source_facts.package-manager


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** md4c
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## Other Package-Manager Records

- Debian apt - libmd4c-dev - 0.5.2-2+b1: normalized package name match | Debian stable package indexes: libmd4c-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Markdown for C - development files | https://github.com/mity/md4c
- Debian apt - libmd4c-html0 - 0.5.2-2+b1: normalized package name match | Debian stable package indexes: libmd4c-html0 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Markdown for C HTML-renderer | https://github.com/mity/md4c
- Debian apt - libmd4c-html0-dev - 0.5.2-2+b1: normalized package name match | Debian stable package indexes: libmd4c-html0-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Markdown for C HTML-renderer - development files | https://github.com/mity/md4c
- Debian apt - libmd4c0 - 0.5.2-2+b1: normalized package name match | Debian stable package indexes: libmd4c0 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Markdown for C | https://github.com/mity/md4c
- Debian apt - md2html - 0.5.2-2+b1: normalized package name match | Debian stable package indexes: md2html from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Markdown to HTML converter | https://github.com/mity/md4c
- Nix - md4c: normalized package name match | nixpkgs package indexes: pkgs/by-name/md/md4c/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - libmd4c-dev - 0.4.8-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libmd4c-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Markdown for C - development files | https://github.com/mity/md4c
- Ubuntu apt - libmd4c-html0 - 0.4.8-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libmd4c-html0 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Markdown for C HTML-renderer | https://github.com/mity/md4c
- Ubuntu apt - libmd4c-html0-dev - 0.4.8-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libmd4c-html0-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Markdown for C HTML-renderer - development files | https://github.com/mity/md4c
- Ubuntu apt - libmd4c0 - 0.4.8-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libmd4c0 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Markdown for C | https://github.com/mity/md4c
- apk - md4c - 0.5.3-r0: normalized package name match | Alpine Linux edge package indexes: md4c from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Fast Markdown parser written in C | https://github.com/mity/md4c
- apk - md4c-dev - 0.5.3-r0: normalized package name match | Alpine Linux edge package indexes: md4c-dev from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Fast Markdown parser written in C (development files) | https://github.com/mity/md4c
- apk - md4c-doc - 0.5.3-r0: normalized package name match | Alpine Linux edge package indexes: md4c-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Fast Markdown parser written in C (documentation) | https://github.com/mity/md4c
- apk - md4c-libs - 0.5.3-r0: normalized package name match | Alpine Linux edge package indexes: md4c-libs from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Fast Markdown parser written in C (libraries) | https://github.com/mity/md4c
- dnf - md4c - 0.5.1-5.fc44: normalized package name match | Fedora Rawhide package metadata: md4c from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Markdown for C | https://github.com/mity/md4c
- dnf - md4c-devel - 0.5.1-5.fc44: normalized package name match | Fedora Rawhide package metadata: md4c-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Development files for md4c | https://github.com/mity/md4c


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [cmake](https://www.automicvault.com/pkg/brew/cmake/) - Build dependency declared by Homebrew.
- [qt@5](https://www.automicvault.com/pkg/brew/qt-5/) - Popular package that depends on this formula.
- [qtbase](https://www.automicvault.com/pkg/brew/qtbase/) - Popular package that depends on this formula.
- [tracy](https://www.automicvault.com/pkg/brew/tracy/) - Popular package that depends on this formula.
- [comrak](https://www.automicvault.com/pkg/brew/comrak/) - Shares av.db curated category or tags: cli, commonmark, developer-tools, markdown, markup.
- [peg-markdown](https://www.automicvault.com/pkg/brew/peg-markdown/) - Shares av.db curated category or tags: c, cli, developer-tools, markdown, markup.
- [cmark](https://www.automicvault.com/pkg/brew/cmark/) - Shares av.db curated category or tags: c, cli, commonmark, developer-tools, markdown.
- [cmark-gfm](https://www.automicvault.com/pkg/brew/cmark-gfm/) - Shares av.db curated category or tags: c, cli, commonmark, developer-tools, markdown.
- [hoedown](https://www.automicvault.com/pkg/brew/hoedown/) - Shares av.db curated category or tags: cli, developer-tools, markdown, markup, parser.
- [htmlcxx](https://www.automicvault.com/pkg/brew/htmlcxx/) - Shares av.db curated category or tags: cli, developer-tools, library, markup, parser.
- [marked](https://www.automicvault.com/pkg/brew/marked/) - Shares av.db curated category or tags: cli, developer-tools, markdown, markup, parser.
- [python-markdown](https://www.automicvault.com/pkg/brew/python-markdown/) - Shares av.db curated category or tags: cli, developer-tools, markdown, markup, parser.

## Combined YAML source

View the package source record on GitHub. [combined/md4c.yml](https://github.com/automic-vault/db/blob/main/combined/md4c.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
