.NET and Mono Wrapper for HTML Tidy

Welcome to tidyfornet, a .NET and Mono wrapper for HTML Tidy.

What is HTML Tidy?

HTML Tidy is an open source program and library for checking and generating clean XHTML/HTML. It cleans up coding errors in HTML files and fixes bad formatting. It can output files in the HTML, XHTML or XML file format.

Using HTML Tidy, developers can programatically clean up and fix poorly-written HTML pages. Another use is to convert HTML to XHTML or XML. These files can then be easily processed using the tools in the traditional XML chain, such as XSL transforms.

A .NET and Mono Wrapper for HTML Tidy allows any developer using the Microsoft .NET Framework or Mono to target HMTL Tidy directly from his or her own code. tidyfornet brings the power of HTML Tidy to programming languages such as Visual Basic, C#, C++/CLI,...

This wrapper is based upon a wrapper provided by Adrian Bateman

The key advantage of this .NET and Wrapper is that it directly binds into the original HTML Tidy library, which is written in C. It then exposes a .NET class that can be consumed by any .NET application. By directly binding to the original HTML Tidy sources, incorporating updates in the original HTML Tidy program is merely a matter of updating source files.

However, due to the lack of C++.NET support on the Linux platform, the wrapper itself has been rewritten in C# and now uses P/Invoke calls to access the HTML Tidy library. HTML Tidy itself, of course, is not re-written in C#, and at all times the latest version can be obtained by merely updating the sources.

Charles Reitzel provides a .NET Wrapper for HTML Tidy, but it is based on a COM+ Wrapper for HTML Tidy. This adds another layer of complexity to the wrapper and doesn't allow for easy deployment, since the COM+ wrapper needs to be registered on the machine. Additionaly, any COM+ wrapper will clearly fail to run on the Linux platform. tidyfornet takes the full boat approach.

A .NET port of HTML Tidy is also available, but hasn't been updated in a long time.

Download/Subversion access

Currently, the only way to obtain access to the .NET Wrapper for HTML Tidy is through subversion. You can browse the subversion repository containing all the source code or log in directly using subversion. (https://tidyfornet.cvs.sourceforge.net/svnroot/tidyfornet).


This project accepts contributions. If you extend this .NET and Mono Wrapper for HTML Tidy, please send back your enhancements.


See the SourceForge foundry for the bug tracking system.

More information

For more information, contact Frederik Carlier.

Valid XHTML 1.0 Strict