Stage 01 · Write · Researched comparison
Best Ruby Markdown Parsers in 2026
Kramdown is the first pick for most Ruby projects that need a pure-Ruby parser with broad Markdown and extension support, and it is the default in Jekyll. Choose CommonMarker when you want strict CommonMark and GitHub Flavored Markdown behavior. Choose Markly when you need a fast C-based parser with a modern extension set. All five options here are open source and free to use.
By Shihab Mia
Published 27 Nov 2026 · 5 tools compared
We run no ads and no affiliate links at launch. The order of a list follows our published method. See how we score.
Prices are the starting prices vendors list publicly. Plans change, so confirm the current price on the vendor page before you buy.
Key takeaways
- Kramdown is pure Ruby, ships with Jekyll, and supports several Markdown dialects plus extensions.
- CommonMarker targets CommonMark and GitHub Flavored Markdown and is built on the comrak Rust library.
- Redcarpet is a C extension with a mature feature set, but its repository is in maintenance mode rather than active feature development.
- All five parsers are free and open source, so cost is not a deciding factor; platform support, spec compliance and extension needs are.
Who each pick is for
- Jekyll sites and projects needing extensionsKramdown
- Strict CommonMark and GitHub Flavored MarkdownCommonMarker
- Existing apps already using its renderer APIRedcarpet
- Fast parsing with a modern extension setMarkly
- Simple Discount-style Markdown renderingRDiscount
Comparison
| Tool | Best for | Standout feature | Listed starting price | Free plan or trial |
|---|---|---|---|---|
| 1Kramdown | Jekyll sites and projects needing extensions | Pure Ruby with no native build step | Free (open source) | Free plan |
| 2CommonMarker | Strict CommonMark and GitHub Flavored Markdown | Follows the CommonMark spec and GFM extensions | Free (open source) | Free plan |
| 3Redcarpet | Existing apps already using its renderer API | Fast C extension | Free (open source) | Free plan |
| 4Markly | Fast parsing with a modern extension set | C-based parser with GFM-style extensions | Free (open source) | Free plan |
| 5RDiscount | Simple Discount-style Markdown rendering | Small C extension with a simple API | Free (open source) | Free plan |
How we picked
We compared these libraries on fit for common Ruby Markdown jobs, platform and build requirements, licence and cost, and main limits such as spec compliance and extension support. We also considered maintenance status where the project documents it. Sources are vendor pages, official documentation and project repositories. Prices and project status can change, so confirm details on the vendor or repository page before you commit.
The tools, one by one
Kramdown
Best for jekyll sites and projects needing extensions

What it is and where it fits
Kramdown is a pure-Ruby Markdown parser and converter. It reads Markdown and outputs HTML, and it also supports other output formats through its converter layer. It handles standard Markdown plus extensions such as tables, definition lists, footnotes and attribute lists. It is the default Markdown engine in Jekyll, which makes it a common choice for static sites and blogs.
Because it is pure Ruby, it installs without a compiler or native toolchain, which helps on constrained hosts and in CI images. The tradeoff is speed: on very large documents or high-volume rendering, C-based parsers usually finish faster. Kramdown's syntax is not identical to CommonMark, so content written for one may render slightly differently in the other. Check the syntax reference if exact output matters.
Choose Kramdown when you want extensions and a pure-Ruby install. Skip it if you need strict CommonMark compliance or maximum throughput.
Standout: Pure Ruby with no native build step
Free (open source), as listed by the vendor (Kramdown website). Confirm the current plan price before you buy.
Free plan. Plans change, so confirm on the vendor's pricing page before you buy.
Benefits
- Pure Ruby with no native build step
- supports multiple Markdown dialects and extensions
Drawbacks
- Slower than C-based parsers on large inputs
- syntax differs from strict CommonMark in places
Skip it if this limit matters to you: slower than C-based parsers on large inputs.
Verdict. A sensible pick for jekyll sites and projects needing extensions.
Alternatives in this guide: CommonMarker, Redcarpet, Markly
CommonMarker
Best for strict CommonMark and GitHub Flavored Markdown

What it is and where it fits
CommonMarker is a Ruby wrapper around the comrak Rust library. It parses CommonMark and GitHub Flavored Markdown, including tables, strikethrough, autolinks and task lists. It can render HTML and also exposes the parsed document as an AST, which suits tools that need to walk or transform nodes rather than just render.
It is a native extension, so installation compiles or loads platform-specific code. That is usually fine on standard Linux and macOS setups but adds friction on unusual platforms. Because it targets the CommonMark spec, output is predictable and matches other compliant parsers more closely than Kramdown's extended syntax does.
Choose CommonMarker when spec compliance and GFM behavior matter, such as rendering README files or user-submitted comments. Skip it if you depend on Kramdown-specific extensions.
Standout: Follows the CommonMark spec and GFM extensions
Free (open source), as listed by the vendor (CommonMarker website). Confirm the current plan price before you buy.
Free plan. Plans change, so confirm on the vendor's pricing page before you buy.
Benefits
- Follows the CommonMark spec and GFM extensions
- exposes an AST for custom processing
Drawbacks
- Native extension to build
- fewer non-standard extensions than Kramdown
Skip it if this limit matters to you: native extension to build.
Verdict. A sensible pick for strict CommonMark and GitHub Flavored Markdown.
Redcarpet
Best for existing apps already using its renderer API

What it is and where it fits
Redcarpet is a Ruby C extension for Markdown parsing. It has been widely used in Rails applications and offers a renderer API with options for tables, fenced code blocks, autolinks, strikethrough and footnotes. It is fast and has a small dependency footprint.
Its maintenance status matters. The project repository describes it as maintained for bug fixes rather than active feature work, and it does not aim for strict CommonMark compliance. For new projects, that makes it a weaker default than CommonMarker or Markly. For existing applications that already depend on its renderer behavior, switching parsers can change rendered output, so migration needs testing.
Choose Redcarpet if you are maintaining an app that already uses it and the output is stable. Skip it for new projects that want spec compliance or active feature development.
Standout: Fast C extension
Free (open source), as listed by the vendor (Redcarpet website). Confirm the current plan price before you buy.
Free plan. Plans change, so confirm on the vendor's pricing page before you buy.
Benefits
- Fast C extension
- long-standing renderer API with many options
Drawbacks
- Repository is in maintenance mode
- not strict CommonMark
Skip it if this limit matters to you: repository is in maintenance mode.
Verdict. A sensible pick for existing apps already using its renderer API.
Alternatives in this guide: Kramdown, CommonMarker, Markly
Markly
Best for fast parsing with a modern extension set

What it is and where it fits
Markly is a Ruby gem that wraps the cmark-gfm C library. It parses CommonMark with GitHub Flavored Markdown extensions and renders HTML. It is designed as a fast, actively maintained option and is used in Ruby tooling that needs quick Markdown rendering.
Like CommonMarker and Redcarpet, it is a native extension, so it needs a working build environment when a precompiled binary is not available for your platform. Its API is smaller than Kramdown's, and it does not carry Kramdown's non-standard extensions. Output follows the cmark-gfm behavior, which helps when you want rendering that matches GitHub.
Choose Markly when speed and GFM output are priorities and you are comfortable with a native extension. Skip it if you need pure-Ruby installation or Kramdown-specific syntax.
Standout: C-based parser with GFM-style extensions
Free (open source), as listed by the vendor (Markly website). Confirm the current plan price before you buy.
Free plan. Plans change, so confirm on the vendor's pricing page before you buy.
Benefits
- C-based parser with GFM-style extensions
- actively developed
Drawbacks
- Native extension to build
- smaller ecosystem than Kramdown
Skip it if this limit matters to you: native extension to build.
Verdict. A sensible pick for fast parsing with a modern extension set.
Alternatives in this guide: Kramdown, CommonMarker, Redcarpet
RDiscount
Best for simple Discount-style Markdown rendering

What it is and where it fits
RDiscount is a Ruby interface to the Discount Markdown library, written in C. It provides a compact API for converting Markdown to HTML and supports common features such as tables, fenced code and autolinks. It has been used in Ruby web applications for simple rendering tasks.
It is not a CommonMark parser, and its extension set is narrower than CommonMarker or Markly. For projects that only need basic Markdown to HTML conversion and want a small dependency, it can be enough. For anything that depends on spec compliance or a broad extension set, the newer options are a better fit. Check the repository for current activity before adopting it in a new project.
Standout: Small C extension with a simple API
Free (open source), as listed by the vendor (RDiscount website). Confirm the current plan price before you buy.
Free plan. Plans change, so confirm on the vendor's pricing page before you buy.
Benefits
- Small C extension with a simple API
- implements Discount-style Markdown
Drawbacks
- Narrower feature set than newer parsers
- not CommonMark compliant
Skip it if this limit matters to you: narrower feature set than newer parsers.
Verdict. A sensible pick for simple Discount-style Markdown rendering.
Alternatives in this guide: Kramdown, CommonMarker, Redcarpet
Who should use what
If you run a Jekyll site or need extensions like footnotes and attribute lists, start with Kramdown. If you render README files or user comments and want output that matches GitHub, use CommonMarker or Markly. If you maintain an older Rails app that already depends on Redcarpet's renderer behavior, keep it and test carefully before switching. If you only need basic Markdown to HTML in a small script, RDiscount may be enough, but check its activity first.
Questions to settle before you buy
What to check before you buy
- Confirm whether the parser targets strict CommonMark, GFM, or its own extended syntax, and test your real content against it.
- Check whether the gem is a native extension and whether your deployment platform and CI can build or load it.
- Review the licence and the repository's recent activity before adopting a parser for a new project.
- Test rendered output for tables, code fences, links and raw HTML against your expected result.
- If you process untrusted input, review how the parser handles raw HTML and pair it with a sanitizer.
FAQ
Is Kramdown CommonMark compliant?
No. Kramdown supports standard Markdown plus its own extensions, and its syntax differs from strict CommonMark in some cases. If you need spec compliance, use CommonMarker or Markly, which target CommonMark and GitHub Flavored Markdown.
Which Ruby Markdown parser is fastest?
C-based parsers such as CommonMarker, Markly and Redcarpet generally finish faster than pure-Ruby Kramdown on large inputs. We did not run benchmarks, so measure with your own documents before choosing based on speed.
Is Redcarpet still maintained?
The Redcarpet repository describes the project as maintained for bug fixes rather than active feature development. It remains usable, but for new projects CommonMarker or Markly are more actively developed options.
Do these parsers sanitize HTML?
Most Markdown parsers pass through raw HTML by default or offer options to control it. If you render untrusted input, add an HTML sanitizer such as Rails sanitize helpers or a dedicated gem, and do not rely on the parser alone.
Are these parsers free?
Yes. All five libraries listed here are free and open source. Check each repository for its specific licence terms before distributing or modifying the code.
Sources we checked
Method: how we score · editorial policy.
Change log. First published 27 Nov 2026.