What it does
HTML Tidy corrects and cleans HTML and XML markup through a console application. The maintained project supports modern HTML and also provides an embeddable library.
Read an HTML/XML file or standard input, apply cleanup/configuration and write the result to standard output or a separate output file. Diagnostics normally go to standard error and can be saved separately. The modify option instead replaces the input in place. Scripts can distinguish exit codes for success, warnings and errors. Tidy rebuilds a parse tree, so it cannot preserve original indentation, and some indentation choices can alter browser rendering. The console and embeddable C library share the maintained lineage; operating-system bundled copies may be older than the documentation.
Strengths
- Provides a standalone markup-repair tool and a maintained modern-HTML lineage.
Best for
- Preparing HTML or XML documents for later processing
Sources
- HTML Tidy (Oct 26, 2026)
- Tidy Documentation (Oct 26, 2026)
- Tidy Documentation - License (Oct 26, 2026)