{
    "mode": "man",
    "parameter": "html2text",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/html2text/1/json",
    "generated": "2026-06-02T18:07:40Z",
    "synopsis": "",
    "sections": {
        "NAME": {
            "content": "html2text - an advanced HTML-to-text converter\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "",
            "subsections": [
                {
                    "name": "html2text -help",
                    "content": ""
                },
                {
                    "name": "html2text -version",
                    "content": "html2text  [  -unparse  |  -check  ]  [ -debug-scanner ] [ -debug-parser ] [ -rcfile path ] ["
                },
                {
                    "name": "-style -width -o -nobs -ascii -utf8",
                    "content": "] [ -nometa ] [ input-file ...  ]\n",
                    "flag": "-o"
                }
            ]
        },
        "DESCRIPTION": {
            "content": "html2text  reads  HTML  documents from the input-files, formats each of them into a stream of\nplain text characters, and writes the result to standard output (or into output-file, if  the",
            "subsections": [
                {
                    "name": "-o",
                    "content": "If  no  input-files are specified on the command line, html2text reads from standard input. A\ndash as the input-file is an alternate way to specify standard input.\n\nhtml2text understands all HTML 3.2 constructs, but can render only part of them  due  to  the\nlimitations  of the text output format. However, the program attempts to provide good substi‐\ntutes for the elements it cannot render.  html2text parses HTML 4 input, too, but not  always\nas  successful  as  other HTML processors. It also accepts syntactically incorrect input, and\nattempts to interpret it \"reasonably\".\n\nThe way html2text formats the HTML documents is controlled by formatting properties read from\nan RC file.  html2text attempts to read $HOME/.html2textrc (or the file specified by the -rc‐‐\nfile command line  option);  if  that  file  cannot  be  read,  html2text  attempts  to  read\n/etc/html2textrc.  If no RC file can be read (or if the RC file does not override all format‐\nting properties), then \"reasonable\" defaults are assumed. The RC file format is described  in\nthe html2textrc(5) manual page.\n\nDebian    version   of   html2text   also   can   do   input   and   output   recoding   (see\n/usr/share/doc/html2text/README.Debian for more info).  html2text  tries  to  fetch  encoding\nfrom HTML document. If encoding is not specified, you can use -ascii and -utf8 options.  Out‐\nput is converted to user's locale charset (LCCTYPE).\n",
                    "flag": "-o"
                }
            ]
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-nometa",
                    "content": "By default, Debian version of html2text use 'meta http-equiv' tag for input  recoding.\nThis option cancels this behavior.\n"
                },
                {
                    "name": "-ascii -nometa",
                    "content": "this option, plain ASCII is used instead. To find out  how  non-ASCII  characters  are\nrendered, refer to the file \"ascii.substitutes\".\n"
                },
                {
                    "name": "-utf8 -nometa",
                    "content": "fying this option, UTF-8 is used instead (both for input and output). This option  im‐\nplies -nobs.\n"
                },
                {
                    "name": "-check",
                    "content": "cessed otherwise. In this mode of operation, html2text will report on parse errors and\nscan  errors,  which it does not in other modes of operation. Note that parse and scan\nerrors are not fatal for html2text, but may cause mis-interpretation of the HTML  code\nand/or portions of the document being swallowed.\n"
                },
                {
                    "name": "-debug-parser",
                    "content": "Let  html2text  report  on  the tokens being shifted, rules being applied, etc., while\nscanning the HTML document. This option is for diagnostic purposes.\n"
                },
                {
                    "name": "-debug-scanner",
                    "content": "Let html2text report on each lexical token scanned, while scanning the HTML  document.\nThis option is for diagnostic purposes.\n"
                },
                {
                    "name": "-help",
                    "content": ""
                },
                {
                    "name": "-nobs",
                    "content": "score-backspace-character\" and boldface letters like  \"character-backspace-character\".\nBecause  of issues with UTF-8, Debian version of html2text doesn't produce backspaces,\nso this option really does nothing.\n"
                },
                {
                    "name": "-o",
                    "content": "Write the output to output-file instead of standard output. A dash as the  output-file\nis an alternate way to specify the standard output.\n",
                    "flag": "-o"
                },
                {
                    "name": "-rcfile",
                    "content": "Attempt to read the file specified in path as RC file.\n"
                },
                {
                    "name": "-style",
                    "content": "Style  pretty  changes  some  of the default values of the formatting parameters docu‐\nmented in html2textrc(5).  To find out which and how the formatting parameter defaults\nare  changed,  check the file \"pretty.style\". If this option is omitted, style compact\nis assumed as default.\n"
                },
                {
                    "name": "-unparse",
                    "content": "This option is for diagnostic purposes: Instead of  formatting  the  parsed  document,\ngenerate  HTML  code, that is guaranteed to be syntactically correct. If html2text has\nproblems parsing a syntactically incorrect HTML document, this option may help you  to\nunderstand what html2text thinks that the original HTML code means.\n"
                },
                {
                    "name": "-version",
                    "content": "Print program version and exit.\n"
                },
                {
                    "name": "-width",
                    "content": "By  default, html2text formats the HTML documents for a screen width of 79 characters.\nIf redirecting the output into a file, or if your terminal has a width other  than  80\ncharacters,  or  if you just want to get an idea how html2text deals with large tables\nand different terminal widths, you may want to specify a different width.\n"
                }
            ]
        },
        "FILES": {
            "content": "/etc/html2textrc\nSystem wide parser configuration file.\n\n$HOME/.html2textrc\nPersonal parser configuration file, overrides the system wide values.\n",
            "subsections": []
        },
        "CONFORMING TO": {
            "content": "HTML 3.2 (HTML 3.2 Reference Specification - http://www.w3.org/TR/REC-html32),\n",
            "subsections": []
        },
        "RESTRICTIONS": {
            "content": "Debian version of html2text have no http support. Use html2text through pipes  with  curl  or\nwget instead. See README.Debian for more information.\n\nhtml2text  was written to convert HTML 3.2 documents. When using it with HTML 4 or even XHTML\n1 documents, some constructs present only in these HTML versions might not be rendered.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "html2text was written up to version 1.2.2 by Arno Unkrig <arno@unkrig.de> for  GMRS  Software\nGmbH, Unterschleissheim.\n\nCurrent maintainer and primary download location is:\nMartin Bayer <mail@mbayer.de>\nhttp://www.mbayer.de/html2text/files.shtml\n\nThis man page was modified for Debian by Eugene V. Lyubimkin <jackyf.devel@gmail.com> ⟨⟩\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "html2textrc(5), less(1), more(1)\n\n\n\n2008-09-20                                 html2text(1)",
            "subsections": []
        }
    },
    "summary": "html2text - an advanced HTML-to-text converter",
    "flags": [
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "By default, Debian version of html2text use 'meta http-equiv' tag for input recoding. This option cancels this behavior."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "this option, plain ASCII is used instead. To find out how non-ASCII characters are rendered, refer to the file \"ascii.substitutes\"."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "fying this option, UTF-8 is used instead (both for input and output). This option im‐ plies -nobs."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "cessed otherwise. In this mode of operation, html2text will report on parse errors and scan errors, which it does not in other modes of operation. Note that parse and scan errors are not fatal for html2text, but may cause mis-interpretation of the HTML code and/or portions of the document being swallowed."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Let html2text report on the tokens being shifted, rules being applied, etc., while scanning the HTML document. This option is for diagnostic purposes."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Let html2text report on each lexical token scanned, while scanning the HTML document. This option is for diagnostic purposes."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "score-backspace-character\" and boldface letters like \"character-backspace-character\". Because of issues with UTF-8, Debian version of html2text doesn't produce backspaces, so this option really does nothing."
        },
        {
            "flag": "-o",
            "long": null,
            "arg": null,
            "description": "Write the output to output-file instead of standard output. A dash as the output-file is an alternate way to specify the standard output."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Attempt to read the file specified in path as RC file."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Style pretty changes some of the default values of the formatting parameters docu‐ mented in html2textrc(5). To find out which and how the formatting parameter defaults are changed, check the file \"pretty.style\". If this option is omitted, style compact is assumed as default."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "This option is for diagnostic purposes: Instead of formatting the parsed document, generate HTML code, that is guaranteed to be syntactically correct. If html2text has problems parsing a syntactically incorrect HTML document, this option may help you to understand what html2text thinks that the original HTML code means."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Print program version and exit."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "By default, html2text formats the HTML documents for a screen width of 79 characters. If redirecting the output into a file, or if your terminal has a width other than 80 characters, or if you just want to get an idea how html2text deals with large tables and different terminal widths, you may want to specify a different width."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "html2textrc",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/html2textrc/5/json"
        },
        {
            "name": "less",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/less/1/json"
        },
        {
            "name": "more",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/more/1/json"
        }
    ]
}