Overview
HTML Tidy is a long-standing command-line program that repairs and cleans up HTML and XML. Give it a messy document and it fixes common markup mistakes such as missing or mismatched end tags, reports the problems it found, and writes out a consistently indented version. It can also bring old-style markup up to current standards.
The project began at the W3C, where Dave Raggett wrote the original, and is now maintained by a community group called HTACG (the HTML Tidy Advocacy Community Group). The same engine is available as a C library, libtidy, which other software can embed to parse HTML into a node tree, run the clean-up and diagnostics, and pretty-print the result. Many editors and language bindings use it that way.
Tidy runs on Windows, macOS, Linux and other Unix systems. You can download ready-made binaries from the project's site, install it through package managers such as Homebrew, MacPorts, Chocolatey or apt, or build it from the source on GitHub with CMake. The licence is a permissive W3C-style one that allows free use, modification and redistribution, including in commercial products. The latest numbered release named on the site, 5.8.0, dates from 2021, with newer work on development branches.
Categories
Features
- Fixes markup errors such as missing and mismatched tags
- Reports warnings and errors found in a document
- Pretty-prints HTML and XML with consistent indentation
- Upgrades legacy markup towards modern HTML
- libtidy C library for embedding in other software, as static or dynamic builds
- Many configuration options, settable on the command line or in a config file
- Prebuilt binaries plus packages for Homebrew, MacPorts, Chocolatey and apt
Privacy
See the official privacy policy. Tidy is installed software that processes files on your own computer.
Pros & Cons
Pros
- Free and open source under a permissive licence that allows commercial use
- Runs locally, so documents never leave your machine
- Available on Windows, macOS, Linux and other Unix systems
- Easy to script and to embed through libtidy
Cons
- Command line only; there is no official graphical interface
- The latest numbered release on the site is from 2021
- Automatic repairs can change markup in ways you did not expect, so output needs checking
- The large set of options takes time to learn
Community Reviews (0)
No written reviews yet — be the first to rate this tool.
Similar Tools
-
HTML Validators · W3C Validators
Checks HTML documents for markup errors.
Open Source No Signup Web API