Code Syntax Highlighter
Paste some code into the top box, select a language from the list, and click 'Go'. The syntax highlighter will convert the code into HTML preserving indentation and whitespace, escaping entity characters, and colouring language keywords, comments and string literals. The rendered version of the code, and the generated source code, will be shown in lower box.
You can download this utility to use offline.