Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Markdownify Content

Security covered Under active development 1,599 sites

Markdownify is a Drupal module that converts your site's content into a lightweight, Markdown format. This makes it easier and more cost-effective for bots, AI agents, and developers to access and parse your content by removing unnecessary HTML elements.

Markdownify is a Drupal module that provides a seamless solution for generating Markdown versions of your site's content. Via any of the six supported request patterns, this module enables bots, AI agents, and developers to access a lightweight, Markdown-based representation of your site’s content for easier parsing and consumption.

Why MarkDown?

While modern LLMs can ingest and parse raw HTML, Markdown offers significant advantages:

  • Cost Efficiency: AI services charge based on token usage, typically in increments of one million. In our testing, Markdown reduces token count by a 10:1 ratio compared to HTML, leading to lower costs.
  • Faster Processing: The reduction in token count results in quicker processing of your content in Markdown format.
  • Zero distractions: The MarkDown output omits headers, footers, ads, and other irrelevant output, providing a clean and concise context for AI models.
  • Universal Format: Markdown is widely supported and easily understood by AI models, making it the lingua franca for structured text. 1

Six Ways to Access Markdown Content

Once enabled, Markdownify provides six ways to access Markdown-formatted content. With the Markdownify Path submodule enabled, you can also access Markdown content via human-readable path aliases.

  1. Appending .md to the canonical entity URL:

    curl -I https://yourwebsite.com/node/1.md
  2. Appending .md to to Path Aliases (via Markdownify Path Submodule):

    curl -I https://yourwebsite.com/en/articles/give-your-oatmeal-the-ultimate-makeover.md
  3. Using the /markdownify Path Prefix:

    curl -I https://yourwebsite.com/markdownify/node/1
  4. Using the _format Query Parameter:

    curl -I "https://yourwebsite.com/node/1?_format=markdown"

    See https://www.drupal.org/node/2501221 for more information about the "_format" query parameter.

  5. Using the Accept Header:

    curl -I https://yourwebsite.com/node/1 -H "Accept: text/markdown"
  6. Using the Content-Type Header:

    curl -I https://yourwebsite.com/node/1 -H "Content-Type: text/markdown"

How it Works

The Markdownify module leverages the power of the League HTML-to-Markdown Library to convert HTML-rendered content into clean Markdown format.

The required library, league/html-to-markdown, is installed via Composer as part of the module’s dependencies.

When a request for a .md version of an entity is received, the module:

  1. Renders the Entity: The module uses the standard Drupal render pipeline
    to generate the HTML representation of the requested entity.
  2. Converts HTML to Markdown: Using the League\HTMLToMarkdown\HtmlConverter, the module processes the HTML output and transforms it into Markdown format.
  3. Delivers Markdown Output: The Markdown version of the content is served to the client, omitting unnecessary elements like headers, footers, or advertisements.

By removing unnecessary elements like headers, footers, and ads, the output remains concise and AI-friendly.

Drupal 9–11

Ask your assistant about Markdownify Content

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

  • node Drupal core
  • taxonomy Drupal core

Required by

3 tracked projects depend on this one

Activity

Tracked releases
17
Tracked since
Mar 2025
Latest release
1 month ago
Releases (12 mo)
2 ▼ from 15
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
1.2.0 Stable 9–11 Aug 19, 2026
1.1.4 Stable 9–11 Mar 22, 2026
1.1.3 Stable 9–11 Oct 11, 2025
1.1.2 Stable 9–11 Oct 11, 2025
1.1.x-dev Dev 9–11 Oct 7, 2025
1.1.1 Stable 9–11 Jun 19, 2025
1.1.0 Stable 9–11 Jun 6, 2025
1.0.0 Stable 9–11 Apr 23, 2025
1.0.0-rc8 Pre-release 9–11 Apr 4, 2025
1.0.0-rc7 Pre-release 9–11 Apr 3, 2025