We present the Stokes polarimeter for the new Coronal Solar Magnetism Observatory K-coronagraph. The polarimeter can be used in two modes. In observation mode, it is sensitive to linear polarization only and operates as a "Stokes definition" polarimeter. In the ideal case, such a modulator isolates a particular Stokes parameter in each modulation state. For calibrations, the polarimeter can diagnose the full Stokes vector. We present here the design process of the polarimeter, analyze its tolerances with a Monte Carlo method, develop a way to align the individual elements, and measure and evaluate its performance in both modes.