# kramdown

> Fast, pure-Ruby Markdown-superset converter

Source: https://talira.ai/catalog/kramdown-5nvdegy1
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library, Command-line tool
- Categories: [developer tools / parsing / markdown](https://talira.ai/categories/developer-tools/parsing/markdown), [languages / ruby](https://talira.ai/categories/languages/ruby)
- Licence: MIT[^1]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Self-hostable: yes[^2]
- API: yes[^3]
- Creator: Thomas Leitner (gettalong), who also makes HexaPDF
- Sponsors: GROSSWEBER

kramdown is a pure Ruby library that parses a superset of Markdown, with extensions popularised by PHP Markdown Extra and Maruku (tables, footnotes, definition lists, attribute lists, abbreviations, math), into an element tree and converts it. It reads kramdown, standard Markdown, HTML and, through the kramdown-parser-gfm gem (built in until 2.0), GitHub Flavored Markdown, and writes HTML, LaTeX, kramdown, man pages or text without HTML tags. Code blocks can be highlighted with [Rouge](https://talira.ai/catalog/rouge-ag1bcpgj.md) and math rendered with MathJax or KaTeX. It ships a `kramdown` command, and Thomas Leitner has maintained it since 2009; it moved from the GPL to the MIT licence at 1.0.

## Links

- Website: https://kramdown.gettalong.org/
- GitHub: https://github.com/gettalong/kramdown
- Docs: https://kramdown.gettalong.org/documentation.html

## Problems it solves

- convert Markdown to HTML in Ruby without a C extension
- render GitHub-style Markdown with fenced code blocks and strikethrough in my Ruby app
- I need tables, footnotes and definition lists in Markdown, not just the basics
- add CSS classes and ids to Markdown headings and paragraphs
- turn Markdown documents into LaTeX so I can typeset a PDF
- write man pages in Markdown and generate groff output
- convert existing HTML back into Markdown text
- highlight code blocks in Markdown with Pygments-style CSS
- render math formulas in Markdown with KaTeX on the server
- get automatic ids on headings and a generated table of contents
- strip the HTML out of a Markdown document to get plain text
- convert Markdown files from the command line in a build script

## Features

- kramdown syntax: tables, footnotes, definition lists, abbreviations, attribute lists, math blocks
- parsers for kramdown, Markdown, HTML and GitHub Flavored Markdown (kramdown-parser-gfm)
- converters to HTML, LaTeX, kramdown, man pages and RemoveHtmlTags
- syntax highlighting with Rouge (built in) or CodeRay (kramdown-syntax-coderay)
- math engines including MathJax and KaTeX
- automatic header ids and table of contents
- typographic conversions such as smart quotes and dashes
- kramdown command for converting files or standard input
- GFM options for hard wraps, GitHub quirks and emoji
- element tree API for custom parsers and converters

## Capabilities

- Has an API: plan not known
- Has a command line tool: plan not known

## Trust

Overall: 0.40 out of 1.
Signals: backing 0.35, extensibility 0.40.

- created by Thomas Leitner (gettalong), who also makes HexaPDF
- sponsored by GROSSWEBER

Warnings:

- GitHub activity not fetched yet

## Sources

[^1]: https://github.com/gettalong/kramdown/blob/master/COPYING (checked 20 Nov 2026)
[^2]: https://github.com/gettalong/kramdown (checked 20 Nov 2026)
[^3]: https://kramdown.gettalong.org/documentation.html (checked 20 Nov 2026)
