Scroll to navigation

MARKDOWNIFY(1) User Commands MARKDOWNIFY(1)

NAME

markdownify - convert HTML to Markdown

DESCRIPTION

usage: markdownify [-h] [-s [STRIP ...]] [-c [CONVERT ...]] [-a]

[--default-title] [--heading-style {atx,atx_closed,underlined}] [-b BULLETS] [--strong-em-symbol {*,_}] [--sub-symbol SUB_SYMBOL] [--sup-symbol SUP_SYMBOL] [--newline-style {spaces,backslash}] [--code-language CODE_LANGUAGE] [--no-escape-asterisks] [--no-escape-underscores] [-i [KEEP_INLINE_IMAGES_IN ...]] [--table-infer-header] [-w] [--wrap-width WRAP_WIDTH] [--bs4-options BS4_OPTIONS] [html]

Converts html to markdown.

positional arguments:

The html file to convert. Defaults to STDIN if not provided.

options:

show this help message and exit
A list of tags to strip. This option can't be used with the --convert option.
A list of tags to convert. This option can't be used with the --strip option.
A boolean indicating whether the 'automatic link' style should be used when a 'a' tag's contents match its href.
A boolean to enable setting the title of a link to its href, if no title is given.
Defines how headings should be converted.
A string of bullet styles to use; the bullet will alternate based on nesting level.
Use * or _ to convert strong and italics text
Define the chars that surround '<sub>'.
Define the chars that surround '<sup>'.
Defines the style of <br> conversions: two spaces or backslash at the and of the line thet should break.
Defines the language that should be assumed for all '<pre>' sections.
Do not escape '*' to '\*' in text.
Do not escape '_' to '\_' in text.
Images are converted to their alt-text when the images are located inside headlines or table cells. If some inline images should be converted to markdown images instead, this option can be set to a list of parent tags that should be allowed to contain inline images.
When a table has no header row (as indicated by '<thead>' or '<th>'), use the first body row as the header row.
Wrap all text paragraphs at --wrap-width characters.

--wrap-width WRAP_WIDTH

Specifies the parser that BeautifulSoup should use to parse the HTML markup. Examples include 'html5.parser', 'lxml', and 'html5lib'.

AUTHOR

This manual page was written by Aryan Karamtoth <spaciouscoder78@disroot.org> for the Debian GNU/Linux system, but may be used by others.

March 2026 markdownify 1.2.2