Chocolate does eventually go bad after several years.
Generally chocolate is best eaten within 1 to 2 years of purchasing it or making it.
After 2 years the chocolate starts to go bad as in losing it's texture and quality and can become dried out and crumbly.
Dark chocolate, baking chocolate, bittersweet, or semi-sweet: The higher the cocoa percentage, the longer the shelf life.
These chocolates will generally stay fresh for one to two years.
Since white chocolate is made up of dairy and cocoa butter, it's likely to go bad earlier. It can last up to six months unopened.
How can you tell if chocolate is bad?
If you're seeing cracks or dots on the surface of the chocolate, odds are it's dried out quite a bit since its days as fresh chocolate, and has gone stale.
And if there's mold on the chocolate, throw it away immediately.
If it looks like regular chocolate, it will almost definitely taste like chocolate.
Best before dates for dark chocolate products tend to be over 2 years, and you can normally eat the chocolate for up to 3 years past this if stored properly.
Most resources state that milk chocolate can last approximately 1 year, but take this with a pinch of salt.
When it comes to chocolate, you do not get sick from eating expired chocolate.
This date refers to the time during which you can enjoy the peak quality and flavor of the chocolate but you can still eat chocolate that is past this date as long as it was stored properly and has no signs of spoilage associated with it.