Defuddle is a content extraction tool that converts web pages into clean, readable Markdown or HTML by removing clutter.
The tool solves the problem of extracting primary article content from web pages that are often cluttered with navigation, sidebars, comments, and other non-essential elements. It works by analyzing page structure to identify and isolate the main content, then optionally converting it to Markdown format. The project was originally created for the Obsidian Web Clipper browser extension but is designed to run in any environment, including browsers, Node.js, and the command line.
Defuddle suits developers building content aggregation tools, web clippers, or reading applications who need reliable content extraction. It works across multiple environments through different entry points: a browser API, a Node.js module that accepts DOM implementations like JSDOM or linkedom, and a CLI that accepts URLs, file paths, or piped HTML. Compared to Mozilla Readability, the tool takes a more forgiving approach by removing fewer uncertain elements, provides consistent output formatting for footnotes, math, and code blocks, leverages mobile styles to identify unnecessary page elements, and extracts richer metadata including schema.org data. The CLI offers flexible output options including Markdown conversion, JSON with metadata, YAML frontmatter prepending, and extraction of specific properties, plus language preference and custom User-Agent support for handling access restrictions.
The project is explicitly marked as work in progress. Development activity shows ongoing refinement of the extraction algorithm and output formatting capabilities, with attention to supporting diverse DOM implementations and maintaining compatibility across different runtime environments.