You just copy/paste your code into the first box and hit "Encode" and it does a search and replace for you automatically of the tricky characters you have to encode in order for code to show up properly. Just copy the code from the box for pasting into your post or webpage. It also converts the other way round - i.e. it decodes as well as encodes.
I've edited my previous post, where I'd noted what I'd realised needs to be done to get stuff to display as pure HTML code in a post or Webpage (rather than being treated as tags), to include the link to that conversion tool. I prefer to keep everything together in the same place for ease of reference.
(It took me ages to track down a good working automatic converter. Probably because I was searching using insufficiently hardcore techie terms. So, as a public service, here are some softcore techie terms people like me might use to try to find a tool like this, in the hope that they'll get picked up by Google and make it easier for others to locate the converter in future... HTML converter, HTML encoder, HTML encoding, encode HTML, convert HTML, display code, post code, display HTML, post HTML...).
Technorati Tags: HTML, encode, special characters, escape characters, code, Webpages, Websites, blogs, blogging, Improbulus, A Consuming Experience, Consuming Experience