Zebrafish larvae are ideally suited for high-throughput analyses of vertebrate behavior. The larvae can be examined in multiwell plates and display a range of behaviors during early development. Previous studies have shown that zebrafish larvae display a preference for the edge of the well and several lines of evidence suggest this edge preference (thigmotaxis) may be a measure of anxiety. In the present study, we further examined the relation between edge preference and anxiety by imaging zebrafish larvae exposed to three psychoactive drugs diazepam (Valium), fluoxetine (Prozac), and caffeine. The edge preference was first examined in a five-fish assay, with and without visual stimuli. Diazepam, a benzodiazepine that binds to GABA receptors, reduced the larval edge preference, with or without visual stimuli. In contrast, fluoxetine, a selective serotonin reuptake inhibitor, did not affect the edge preference. Caffeine increased the preference for the edge in response to visual stimuli. Similar effects were observed in a two-fish assay; diazepam-exposed larvae showed a reduced edge preference and caffeine exposed larvae showed an increased edge preference. These results suggest that the edge preference in zebrafish larvae is a measure of anxiety and further illustrate that the pharmaceuticals used in the study have different mechanisms of action. Although there are substantial differences between zebrafish and human brains, our results indicate that the signals that regulate anxiety are similar on a molecular level. We propose that high-throughput assays in zebrafish may be used to uncover genetic or environmental factors that cause anxiety disorders and may contribute to the development of novel strategies to prevent or treat such disorders.