Many commercial chemicals pose hazard to human and environmental health. Yet, current legislative programs often do not require that chemicals are tested for safety before they are put into production. In fact, the overwhelming majority of chemicals in use today have never been independently tested for safety. Lax regulations and prohibitive costs of animal testing are the main reasons why chemicals like BPA, phthalates or PBDEs are pulled off the market after prolonged public outcry, only to be replaced with equally toxic substances. Socially and economically, this is not a sustainable approach. To provide a viable alternative to animal tests, we develop computer models to study the mechanisms by which toxicants interact with biological targets, such as enzymes or nucleic acids. Our methods rely on the know-how acquired in computer-aided drug discovery over the past two decades. In conjunction with toxicological data we then build fast, inexpensive and accurate algorithms that predict toxicity outcomes and constitute frameworks for rational design of safer chemicals.