There is a tool for this, called MagicWand 2.0, but you can only get one if you are a student at Hogwarts. The rest of us muggles have to use things like the HTML Validator service, which points out any errors we've made, after which we have to fix them manually. Some code editors like Dreamweaver do highlight code errors for you, but I don't think they actually fix them for you, although they do give hints, I think.
Of course, browsers themselves correct errors to some extent (if they see an error, they try to work out what the code should have been and present that), but there's only so much they can do, and it's certainly a game of Roulette to rely on that form of error correction.
You're welcome, and I hope I wasn't too cheeky. Yes, working through validator issues can be tedious, but it also helps one to learn, so that—hopefully—errors won't appear in your code later on. Most of the errors you tend to see are caused by lack of understanding of code, rather than typos, although they happen too, of course.