Einstein-Podolsky-Rosen steering is a manifestation of quantum correlations exhibited by quantum systems that allows for entanglement certification when one of the subsystems is not characterized. Detecting the steerability of quantum states is essential to assess their suitability for quantum information protocols with partially trusted devices. We provide a hierarchy of sufficient conditions for the steerability of bipartite quantum states of any dimension, including continuous variable states. Previously known steering criteria are recovered as special cases of our approach. The proposed method allows us to derive optimal steering witnesses for arbitrary families of quantum states and provides a systematic framework to analytically derive nonlinear steering criteria. We discuss relevant examples and, in particular, provide an optimal steering witness for a lossy single-photon Bell state; the witness can be implemented just by linear optics and homodyne detection and detects steering with a higher loss tolerance than any other known method. Our approach is readily applicable to multipartite steering detection and to the characterization of joint measurability.