This code is based on the fantastic work by Jean-Claude Manoli. The original source/page can be found here http://www.manoli.net/csharpformat/. I basically just changed the output of the code to add some styling and then added the toolbar/javascript functionality.
This tool allows you to format your C#, VB, HTML, XML, T-SQL or MSH (code name Monad) code for publishing on a web site or in a blog.
The output conforms to the HTML 4.01 specification and is color-coded to make it easier to read. The colors can be changed by modifying the CSS style sheet.
Paste your source code in the box, select your options below and press the button: