View Rendered Source is a Firefox extension that aims to help, by allowing you to view the source code of an HTML after any transformations. And it does so in a very readable, structured way too.
Please note: I experienced a serious problem where the extension caused my PC to reboot (!). The creator of the extension has since published a simple fix (set the option to open in a separate window rather than a tab) — I strongly recommend you enable this feature.
If you’re looking for an equivalent for Internet Explorer, you might check out Instant Source, which does much the same job although in a slightly different way. Sadly, it’s not free.