Infrared femtosecond laser pulses are important tools both in strong-field physics, driving x-ray high-harmonic generation, and as the basis for widely tunable, if inefficient, ultrafast sources in the visible and ultraviolet. Although anomalous material dispersion simplifies compression to few-cycle pulses, attosecond pulses in the infrared have remained out of reach. We demonstrate soliton self-compression of 1800-nm laser pulses in hollow capillary fibers to subcycle envelope duration (2 fs) with 27-GW peak power, corresponding to attosecond field transients. In the same system, we generate wavelength-tunable few-femtosecond pulses from the ultraviolet (300 nm) to the infrared (740 nm) with energy up to 25 μJ and efficiency up to 12%, and experimentally characterize the generation dynamics in the time-frequency domain. A compact second stage generates multimicrojoule pulses from 210 to 700 nm using less than 200 μJ of input energy. Our results significantly expand the toolkit available to ultrafast science.