django-markdownify
Markdown template filter for Django.
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has low install friction, carries a permissive MIT license, and solves a common Django need—rendering Markdown safely in templates. No known vulnerabilities and a stable dependency set make it a straightforward choice for projects that need template-level Markdown conversion.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Django to be installed and configured; the filter only works within Django template contexts.
- Low friction install with three straightforward runtime dependencies (Django, markdown, bleach).
- Active maintenance with a recent release in May 2026 and consistent repository activity.
License · maintenance · safety
MIT (permissive) — MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.
last release 2026-05-18 (88 days) · last repo commit 2026-05-18 · 130 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 154,728 downloads/mo, #10,846 on PyPI
Alternatives
Verify before relying
# In Django settings.py, configure if needed:
MARKDOWNIFY = {"default": {"WHITELIST_TAGS": ["a", "p"]}}
# In your template:
{% load markdownify %}
{{ mytext|markdownify }}
# Or with an alternative configuration:
{{ mytext|markdownify:"alternative" }}- Whether the package handles edge cases in markdown-to-HTML conversion beyond what markdown and bleach provide by default
- Performance characteristics when processing large volumes of markdown text in templates
What it is and what it does
Django Markdownify is a template filter that processes Markdown syntax into HTML within Django templates, automatically sanitizing the output using bleach to prevent injection attacks. It wraps the markdown and bleach libraries, allowing you to write `{{ text|markdownify }}` in templates to render user-supplied or content-managed Markdown safely.
The package supports multiple configuration profiles, so you can define different whitelist tags and markdown extensions for different use cases—for example, one profile for user comments (restrictive) and another for documentation (permissive). Settings are defined in Django's settings.py and referenced by name in templates. It has been maintained since 2016 and remains actively developed.
Use it for
- Render user-submitted comments or forum posts as HTML while restricting dangerous tags and scripts.
- Display documentation or help text written in Markdown within Django admin or frontend templates.
- Convert content-managed Markdown fields (e.g., from a CMS) to HTML with site-specific tag whitelists.
- Build blog or news sites where authors write in Markdown and the template layer handles HTML conversion.
- Sanitize Markdown from external APIs or feeds before displaying in Django templates.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, has low install friction, carries a permissive MIT license, and solves a common Django need—rendering Markdown safely in templates. No known vulnerabilities and a stable dependency set make it a straightforward choice for projects that need template-level Markdown conversion.
Install
django-markdownify on PyPI
Before you install
Low friction install with three straightforward runtime dependencies (Django, markdown, bleach). Active maintenance with a recent release in May 2026 and consistent repository activity.
Requires Django to be installed and configured; the filter only works within Django template contexts.
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.
Quickstart
# In Django settings.py, configure if needed:
MARKDOWNIFY = {"default": {"WHITELIST_TAGS": ["a", "p"]}}
# In your template:
{% load markdownify %}
{{ mytext|markdownify }}
# Or with an alternative configuration:
{{ mytext|markdownify:"alternative" }}
Verify before relying
- Whether the package handles edge cases in markdown-to-HTML conversion beyond what markdown and bleach provide by default
- Performance characteristics when processing large volumes of markdown text in templates
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesDjangomarkdownbleach |
| Maintenance | Actively maintained 88 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 154,728 / month, #10,846 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Environment :: Web EnvironmentFramework :: DjangoIntended Audience :: DevelopersOperating System :: OS Independent |
Evidence: django_markdownify-0.9.7-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “django markdown to html filter”
- django-markdownifyA Django template filter that converts Markdown text to sanitized…
- markdown2Converts Markdown text to HTML using a fast, complete Python…
- django-markdownxDjango MarkdownX provides a Markdown editor widget for Django…
Give your agent the search over MCP, or paste the wish link into any chat.
More HTML packages
MarkupSafe provides a text object that escapes special characters so untrusted strings can be safely embedded in HTML and XML without injection attacks.
Jinja2 is a templating engine that renders dynamic content by combining templates with Python-like syntax and data, supporting template inheritance, macros, autoescaping, and sandboxed execution.
Beautiful Soup parses HTML and XML documents into a navigable tree, providing Pythonic methods to search, iterate, and modify the parsed content.
Install it if you need to parse or extract data from markup documents.
lxml provides Python bindings to libxml2 and libxslt, enabling parsing, validation, and transformation of XML and HTML documents through an ElementTree-compatible API with support for XPath, XSLT, and schema validation.
Install it if you need robust XML/HTML parsing, validation, or transformation; avoid it only if you must stay pure-Python and can accept slower performance.
Docutils converts plaintext documentation in reStructuredText format into multiple output formats including HTML, XML, and LaTeX using a modular processing system.
Converts Markdown text to HTML using a Python implementation of John Gruber's Markdown specification, with support for extensions.
Install it if you need to parse Markdown in Python.
See also markdownify · django-bleach · django-mathfilters · bleach · markdown2 · bleach-allowlist · html-sanitizer · django-settings-export · nh3 · telegramify-markdown