HTML tidy is a command line tool which automatically checks html/xhtml/xml pages for mistakes and tidy up sloppy editing into nicely layed out markup. The tool can be used for a very wide range of platforms.

Originally created by Dave Raggett and now maintained by the open source community at Source Forge.

HTML tidy is distributed at no charge for commercial or non-commercial use and made available under the W3C license.

The latest HTML tidy version can be downloaded from:

The HTML tidy configuration options quick reference can be found at:

rss feed

Quick guides

Using HTML Tidy.

All infomation mentioned in the tables below are based on the HTML Tidy version for Windows released on 1st January 2004.

Operating system used
Windows XP Home Edition Version 5.1 SP 2

Software prerequisites

  1. To start using HTML tidy the following can be entered in a DOS window:
    tidy -h

    It displays a list of command line options and how to use HTML tidy. A few interesting options can be found in the table below.

    Options Description
    -version or -v show the version of Tidy
    -help, -h or -? list the command line options
    -help-config list all configuration options
    -show-config list the current configuration settings

  2. There are several ways to use HTML tidy to validate a single or multiple htm files. In the table below several methods are described.

    Description Files
    Validate a single htm file Download tidy validate_single_file.bat.
    Download config_tidy.txt.
    Validate a fix number of htm files Download validate_fixed_files.bat.
    Download process_files.bat.
    Download config_tidy.txt.
    Download htm_list.txt.
    Validate all htm files located at a specified directory and all of its subdirectories.
    To use this script you must install Ant.
    Download ant build_demo6.xml.
    Download config_tidy.txt.