table of contents
| 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:¶
- html
- The html file to convert. Defaults to STDIN if not provided.
options:¶
- -h, --help
- show this help message and exit
- -s, --strip [STRIP ...]
- A list of tags to strip. This option can't be used with the --convert option.
- -c, --convert [CONVERT ...]
- A list of tags to convert. This option can't be used with the --strip option.
- -a, --autolinks
- A boolean indicating whether the 'automatic link' style should be used when a 'a' tag's contents match its href.
- --default-title
- A boolean to enable setting the title of a link to its href, if no title is given.
- --heading-style {atx,atx_closed,underlined}
- Defines how headings should be converted.
- -b, --bullets BULLETS
- A string of bullet styles to use; the bullet will alternate based on nesting level.
- --strong-em-symbol {*,_}
- Use * or _ to convert strong and italics text
- --sub-symbol SUB_SYMBOL
- Define the chars that surround '<sub>'.
- --sup-symbol SUP_SYMBOL
- Define the chars that surround '<sup>'.
- --newline-style {spaces,backslash}
- Defines the style of <br> conversions: two spaces or backslash at the and of the line thet should break.
- --code-language CODE_LANGUAGE
- Defines the language that should be assumed for all '<pre>' sections.
- --no-escape-asterisks
- Do not escape '*' to '\*' in text.
- --no-escape-underscores
- Do not escape '_' to '\_' in text.
- -i, --keep-inline-images-in [KEEP_INLINE_IMAGES_IN ...]
- 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.
- --table-infer-header
- When a table has no header row (as indicated by '<thead>' or '<th>'), use the first body row as the header row.
- -w, --wrap
- Wrap all text paragraphs at --wrap-width characters.
--wrap-width WRAP_WIDTH
- --bs4-options BS4_OPTIONS
- 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 |