The results of a search for direct pair production of top squarks in events with two opposite-charge leptons (electrons or muons) are reported, using 36.1 fb-1 of integrated luminosity from proton–proton collisions at √s = 13 TeV collected by the ATLAS detector at the Large Hadron Collider. To cover a range of mass differences between the top squark t and lighter supersymmetric particles, four possible decay modes of the top squark are targeted with dedicated selections: the decay t → bχ±1 into a b-quark and the lightest chargino with χ±1 → Wχ01, the decay t → tχ01 into an on-shell top quark and the lightest neutralino, the three-body decay t → bWχ01 and the four-body decay t → bℓνχ01. No significant excess of events is observed above the Standard Model background for any selection, and limits on top squarks are set as a function of the t and χ01 masses. The results exclude at 95% confidence level t masses up to about 720 GeV, extending the exclusion region of supersymmetric parameter space covered by previous searches