Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Release: Opensolr Search 4.5.0 Minor update available for module opensolr_search (4.5.0). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Usage Milestone: Views Reference Filter Module entityreference_filter crossed 10,000 active installs. Usage Milestone: Dropdown Language Module dropdown_language crossed 10,000 active installs. Usage Milestone: Paragraphs Browser Module paragraphs_browser crossed 10,000 active installs. Usage Milestone: OpenAPI Module openapi crossed 10,000 active installs. Usage Milestone: Decoupled Router Module decoupled_router crossed 10,000 active installs. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Markdownify Content

1,239 sites Security covered Drupal 9–11
View on drupal.org

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.

Depends on

Dependencies of the latest stable release

  • node Drupal core
  • taxonomy Drupal core

Required by

2 tracked projects depend on this one

Activity

Tracked releases
17
Tracked since
Mar 2025
Latest release
1 week ago
Releases (12 mo)
5 ▼ from 12
Maintenance
Active

Release Timeline

Releases

Version Type Core 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
1.0.0-rc6 Pre-release 9–11 Mar 21, 2025
1.0.0-rc5 Pre-release 9–11 Mar 20, 2025
1.0.0-rc4 Pre-release 9–11 Mar 20, 2025
1.0.0-rc3 Pre-release 9–11 Mar 19, 2025
1.0.0-rc2 Pre-release 9–11 Mar 14, 2025
1.0.0-rc1 Pre-release 9–11 Mar 13, 2025
1.0.x-dev Dev 9–11 Mar 11, 2025