CGS4DR is data reduction software for the CGS4 instrument at UKIRT. The software can be used offline to reprocess CGS4 data. CGS4DR allows a wide variety of data reduction configurations, and can interlace oversampled data frames; reduce known bias, dark, flat, arc, object and sky frames; remove the sky, residual sky OH-lines (λ < 2.3 μm) and thermal emission (λ ≥ 2.3 μm) from data; and add data into groups for improved signal-to-noise. It can also extract and de-ripple a spectrum and offers a variety of ways to plot data, in addition to other useful features. CGS4DR is distributed as part of the Starlink software collection (ascl:1110.012).