# mixmark-io/turndown

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/mixmark-io-turndown).**

10,813 stars · 962 forks · HTML · mit

## Links

- GitHub: https://github.com/mixmark-io/turndown
- Homepage: https://mixmark-io.github.io/turndown
- awesome-repositories: https://awesome-repositories.com/repository/mixmark-io-turndown.md

## Topics

`browser` `commonmark` `gfm` `html` `html-to-markdown` `javascript` `markdown` `node`

## Description

Turndown is a JavaScript library designed to transform HTML documents into structured Markdown. It functions as a flexible engine that parses web content by traversing the document object model and applying rule-based transformations to convert elements into their corresponding text-based syntax.

The tool distinguishes itself through a modular architecture that allows for extensive customization of the conversion process. Users can define custom conversion rules to handle specific elements, implement content filtering to discard unwanted nodes, and configure character escaping to ensure output compatibility. A plugin system further enables the injection of additional rule sets to modify or extend the default formatting logic.

Beyond basic conversion, the library supports the preservation of raw HTML tags and provides granular control over syntax styles for common document elements. These capabilities facilitate automated workflows such as content scraping, data transformation pipelines, and the migration of web content into static site generators.

## Tags

### Content Management & Publishing

- [HTML to Markdown Reversion Tools](https://awesome-repositories.com/f/content-management-publishing/content-processing-transformation/markdown-markup-tools/markdown-processors/html-to-markdown-reversion-tools.md) — Transforms web content into readable Markdown with granular control over syntax styles. ([source](https://cdn.jsdelivr.net/gh/mixmark-io/turndown@master/README.md))
- [Markdown Parsers](https://awesome-repositories.com/f/content-management-publishing/content-processing-transformation/markdown-markup-tools/markdown-processors/markdown-parsers.md) — Parses DOM elements into structured text output using custom conversion logic and escaping rules.
- [Conversion Rule Engines](https://awesome-repositories.com/f/content-management-publishing/conversion-rule-engines.md) — The conversion tool allows users to define custom logic for parsing and transforming specific web elements into structured text output. ([source](https://cdn.jsdelivr.net/gh/mixmark-io/turndown@master/README.md))
- [Static Site Generators](https://awesome-repositories.com/f/content-management-publishing/static-site-document-generators/static-site-generators.md) — Supports the migration of web content into static site generators by converting live pages into structured Markdown.
- [Markup Preservation Utilities](https://awesome-repositories.com/f/content-management-publishing/markup-preservation-utilities.md) — The conversion tool allows users to configure specific tags to remain as raw HTML in the output instead of being converted into standard text formatting. ([source](https://cdn.jsdelivr.net/gh/mixmark-io/turndown@master/README.md))
- [Content Filtering Utilities](https://awesome-repositories.com/f/content-management-publishing/content-filtering-utilities.md) — A selection mechanism identifies and discards unwanted elements from the document tree before the final text generation occurs.

### Development Tools & Productivity

- [Web Scraping](https://awesome-repositories.com/f/development-tools-productivity/web-scraping.md) — Extracts relevant text from web pages while automatically filtering out unwanted structural elements.
- [Plugin Systems](https://awesome-repositories.com/f/development-tools-productivity/plugin-systems.md) — Provides a plugin system to apply collections of pre-defined rules and configurations for additional syntax features. ([source](https://cdn.jsdelivr.net/gh/mixmark-io/turndown@master/README.md))

### Software Engineering & Architecture

- [Content Format Transformers](https://awesome-repositories.com/f/software-engineering-architecture/string-formatting-utilities/content-format-transformers.md) — Provides a flexible engine for converting HTML documents into readable text formats through extensible plugin collections.
- [Extensible Plugin Architectures](https://awesome-repositories.com/f/software-engineering-architecture/extensible-plugin-architectures.md) — Supports a modular architecture that allows for the injection of custom rule sets to extend conversion logic.

### Part of an Awesome List

- [Parsing Tools](https://awesome-repositories.com/f/awesome-lists/data/parsing-tools.md) — HTML to Markdown converter.

### Web Development

- [Data Transformation Pipelines](https://awesome-repositories.com/f/web-development/jsx-transformers/data-transformation-pipelines.md) — Facilitates automated workflows for converting web-based content into specific text formats.

### Data & Databases

- [Text Transformation Functions](https://awesome-repositories.com/f/data-databases/data-transformation-functions/text-transformation-functions.md) — Maps specific HTML elements to corresponding text-based syntax using pattern-matching functions.

### Security & Cryptography

- [Content Filtering](https://awesome-repositories.com/f/security-cryptography/application-and-system-security/browser-security/content-filtering-blocking/content-filtering.md) — Enables the specification of web elements to be removed from the final output to ensure clean results. ([source](https://cdn.jsdelivr.net/gh/mixmark-io/turndown@master/README.md))
