Tidy Service is a simple OS X Service that cleans up markup using the powerful HTML Tidy library originally created by Dave Raggett.
Screenshot of Menu Items
Tidy Service can be used to clean up HTML markup in any application that supports services by selecting the markup in question and choosing one of Tidy menu items from the Services menu. Currently, there are two processing options: Tidy Markup and Tidy to XHTML. Tidy to XHTML instructs the Tidy engine to generate valid XHTML, while Tidy Markup does not.
Optionally, you can overide HTML Tidy defaults by creating a config file in your home directory.
Currently, there are two processing options: Tidy Markup and
Tidy to XHTML. Tidy to XHTML instructs the Tidy engine to
generate valid XHTML, while Tidy Markup does not.
In addition, you can override any of the default HTML Tidy options by creating a HTML Tidy config file in your home folder called “TidyService.conf”. Note: The name of the file is case sensitive.
This is what I have in my current TidyService.conf (using it to clean up old HTML for use in WordPress posts):