Candida is the most common fungal pathogen of humans worldwide and has become a major clinical problem because of the growing number of immunocompromised patients, who are susceptible to infection. Moreover, the number of available antifungals is limited, and antifungal-resistant Candida strains are emerging. New and effective antifungals are therefore urgently needed. Here, we discovered a small molecule with activity against Candida spp. both in vitro and in vivo. We screened a library of 50,240 small molecules for inhibitors of yeast-to-hypha transition, a major virulence attribute of Candida albicans. This screening identified 20 active compounds. Further examination of the in vitro antifungal and anti-biofilm properties of these compounds, using a range of Candida spp., led to the discovery of SM21, a highly potent antifungal molecule (minimum inhibitory concentration (MIC) 0.2-1.6 µg/ml). In vitro, SM21 was toxic to fungi but not to various human cell lines or bacterial species and was active against Candida isolates that are resistant to existing antifungal agents. Moreover, SM21 was relatively more effective against biofilms of Candida spp. than the current antifungal agents. In vivo, SM21 prevented the death of mice in a systemic candidiasis model and was also more effective than the common antifungal nystatin at reducing the extent of tongue lesions in a mouse model of oral candidiasis. Propidium iodide uptake assay showed that SM21 affected the integrity of the cell membrane. Taken together, our results indicate that SM21 has the potential to be developed as a novel antifungal agent for clinical use.