Polarization is an important property of light, which refers to the direction of electric field oscillations. Polarization modulation plays an essential role for polarization encoding quantum key distribution (QKD). Polarization is used to encode photons in the QKD systems. In this work, visible-range polarizers with optimal dimensions based on resonance grating waveguides have been numerically designed and investigated using the COMSOL Multiphysics Software. Two structures have been designed, namely a single-layer metasurface grating (SLMG) polarizer and an interlayer metasurface grating (ILMG) polarizer. Both structures have demonstrated high extinction ratios, ~1.8·103 and 8.68·104, and the bandwidths equal to 45 and 55 nm for the SLMG and ILMG, respectively.