The use of optical clocks or oscillators in future ultraprecise navigation, gravitational sensing, coherent arrays, and relativity experiments will require time comparison and synchronization over terrestrial or satellite free-space links. Here, we demonstrate full unambiguous synchronization of two optical time scales across a free-space link. The time deviation between synchronized time scales is below 1 fs over durations from 0.1 to 6500 s, despite atmospheric turbulence and kilometer-scale path length variations. Over 2 days, the time wander is 40 fs peak to peak. Our approach relies on the two-way reciprocity of a single-spatial-mode optical link, valid to below 225 attoseconds across a turbulent 4-km path. This femtosecond level of time-frequency transfer should enable optical networks using state-of-the-art optical clocks or oscillators.