TehOne's source code formatter.

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:

Source Language:
Spacing Type:


Note:
Selecting "pre" will output the code with the html <pre> element.
Selecting "nbsp" will cause the spaces in the code to be replaced html non breaking spaces (nbsp).
It is recommended that you first try the Pre option and then see how the code looks once you put it in your webpage. Pay special attention to how it looks in Internet Explorer as it has some rendering problems with the <pre> element.
The output when using the nbsp option will render better in the browser, but it does cause some code bloat.
Options:
Resource Options: