About mod_tidy

What is it?

Before telling what mod_tidy is, we want to clearify what it is not:

Although mod_tidy makes the impression of being a validator, it isn't one. It's just a handy and comfortable tool to help make web documents being valid.

mod_tidy is a TidyLib based DSO module for the Apache HTTP Server Version 2 to parse, clean-up and pretty-print the webservers' (X)HTML output.

Web documents which pass mod_tidy's severe checks – what means, that they don't run into an error page – can be called valid and well-formed (depends on mod_tidy's configuration, the default is severe). So prepared, they easily pass a validation check like the W3C Markup Validation Service, which marks the reference validating tool of its kind. If you regulary control the quality of your Web documents with mod_tidy, the use of an obligatory validation check can more be seen as an optional free exercise.

How does it work?

mod_tidy works as a filter that hooks up to the (X)HTML output of an Apache 2 webserver. It passes the webservers' (X)HTML output to TidyLib which parses and optional cleans-up and pretty-prints that output. If TidyLib detects an error, the client receives a HTML page with a list of all found errors and warnings that prevent the input of being a valid (X)HTML document. If TidyLib doesn't complain, the client will get and display the (X)HTML data as without mod_tidy.

Due to the fact that mod_tidy may affect little response delays of the webserver, its use should be reduced to a developer framework only. mod_tidy is not recommended to be used in a production environment, where response delays of the webserver are undesirable.

Who makes it?

mod_tidy is initially written by Sebastian Tusk, who has retired from that project. The previous official project page has been accessible through the web for years, until it has been silently closed in April 2005. With kindly permission of the initial project owner, Sierk Bornemann has created a new home on to give mod_tidy a new chance.

The mod_tidy core developers are:

Regarding the core of mod_tidy, the TidyLib, on which mod_tidy heavily relies, a lot of underlying work is done by the Tidy library team.


mod_tidy is licensed under an Apache Licence, Version 2.


The initial versions of mod_tidy were created by Sebastian Tusk, who has retired from that project. Since mod_tidy has found a new home at Sourceforge, it is now maintained under the auspices of The mod_tidy Team.

I wish to acknowledge the following copyrighted works that make up portions of the mod_tidy module:

Portions of this software (the TidyLib) were developed at the World Wide Web Consortium (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University). The original software of TidyLib is available from the Tidy project page.