The most discernible and devastating impacts of climate change are caused by events with temporary extreme conditions ("extreme events") or abrupt shifts to a new persistent climate state ("tipping points"). The rapidly growing amount of data from models and observations poses the challenge to reliably detect where, when, why, and how these events occur. This situation calls for data-mining approaches that can detect and diagnose events in an automatic and reproducible way. Here, we apply a new strategy to this task by generalizing the classical machine-vision problem of detecting edges in 2D images to many dimensions (including time). Our edge detector identifies abrupt or extreme climate events in spatiotemporal data, quantifies their abruptness (or extremeness), and provides diagnostics that help one to understand the causes of these shifts.We also publish a comprehensive toolset of code that is documented and free to use. We document the performance of the new edge detector by analyzing several datasets of observations and models. In particular, we apply it to all monthly 2Dvariables of the RCP8.5 scenario of the Coupled Model Intercomparison Project (CMIP5).More than half of all simulations show abrupt shifts of more than 4 standard deviations on a time scale of 10 years. These shifts are mostly related to the loss of sea ice and permafrost in the Arctic.Our results demonstrate that the edge detector is particularly useful to scan large datasets in an efficient way, for examplemultimodel or perturbed-physics ensembles. It can thus help to reveal hidden "climate surprises" and to assess the uncertainties of dangerous climate events.