As others have mentioned, there are MANY tools available that can do this, from open source & free to commercial. However, the first question you need to answer is WHY are you doing this - what are you looking to do with the HTML? Do you simply want the (styled) content? Do you need a "pixel perfect" rendering or would you rather have something that reflows? Do you plan to process the output in a secondary application or is it strictly for viewing. Each of those answers will help you select what tool(s) are accepted for the purpose.
For me, I want the style, but I don't need the fidelity. Do I have two different projects that I would like to share? Or is this going to be something that I use as a fallback (to be used in case I can't reach the CSS or can't be bothered to do it the easy way)? And lastly, in what areas of the code do I want to tweak it? Do I want to use a specific style for just the first 10 lines of the HTML string? In one of my projects, I needed to get the URL from the browser, parse out the URL and then parse in the value from a hash map, similarly to what we did with the data attribute on the tag: (If you're familiar with AngularJS, check out this post for the basic gist). All of those are separate tasks that can be.