Time delays between multiple images of lensed sources can probe the geometry of the universe . We propose a novel method based on free-form modelling of gravitational lenses to estimate time-delay distances and , in turn , cosmological parameters . This approach does not suffer from the degeneracy between the steepness of the profile and the cosmological parameters . We apply the method to 18 systems having time delay measurements and find H _ { 0 } = 69 \pm 6 \mathrm { ( stat . ) } \pm 4 \mathrm { ( syst . ) } ~ { } \mathrm { km~ { } s ^ { -1 } Mpc ^ { - % 1 } } . In combination with WMAP9 , the constraints on dark energy are \Omega _ { w } = 0.68 \pm 0.05 and w = -0.86 \pm 0.17 in a flat model with constant equation-of-state .