macOS / binaries /

tidy

/usr/bin/tidy
Validate, correct, and pretty-print HTML files

tidy reads HTML, XHTML and XML files and writes cleaned up markup. A common use of tidy is to convert plain HTML to XHTML.

source: man
/usr/local/bin/tidy
Validate, correct, and pretty-print HTML files

tidy reads HTML, XHTML and XML files and writes cleaned up markup. For HTML varians, it detects and corrects many common coding errors and strives to produce visually equivalent markup that is both W3C complaint and works on most browsers.

source: man