Smirnov and Zamolodchikov recently introduced a new class of two-dimensional quantum field theories, defined through a differential change of any existing theory by the determinant of the energy-momentum tensor. From this $Tbar T$ flow equation one can find a simple expression for both the energy spectrum and the $S$-matrix of the $Tbar T$ deformed theories. Our goal is to find the renormalized Lagrangian of the $Tbar T$ deformed theories. In the context of the $Tbar T$ deformation of an integrable theory, the deformed theory is also integrable and, correspondingly, the $S$-matrix factorizes into two-to-two $S$-matrices. One may thus hope to be able to extract the renormalized Lagrangian from the $S$-matrix. We do this explicitly for the $Tbar T$ deformation of a free massive scalar, to second order in the deformation parameter. Once one has the renormalized Lagrangian one can, in principle, compute all other observables, such as correlation functions. We briefly discuss this, as well as the relation between the renormalized Lagrangian, the $Tbar T$ flow equation, and the $S$-matrix. We also mention a more general class of integrability-preserving deformations of a free scalar field theory.