Title: Optimal protocols in stochastic thermodynamics Abstract: Thermodynamics of small systems has become an important field of statistical physics. They are driven out of equilibrium by a control, and the question is naturally posed how such a control can be optimized. We show that optimization problems in small system thermodynamics are solved by (deterministic) optimal transport, for which very efficient numerical methods have been developed, and of which there are applications in Cosmology, fluid mechanics, logistics, and many other fields. We show, in particular, that minimizing expected heat released or work done during a non-equilibrium transition in finite time is solved by Burgers equation of Cosmology and mass transport by the Burgers velocity field. Our contribution hence considerably extends the range of solvable optimization problems in small system thermodynamics.