We establish an explicit formula for the solution of the the cubic Szeg\H{o} equation on the real line. Using this formula, we prove that the evolution flow of this equation can be continuously extended to the whole Hardy class $H^2$ on the real line.