  We present a complete design scheme, from theoretical formulation to
experimental validation, exploiting the versatility of metagratings (MGs) for
designing a rectangular waveguide (RWG) $\mbox{TE}_{10}$ - $\mbox{TE}_{20}$
mode converter (MC). MG devices, formed by sparse periodically positioned
polarizable particles (meta-atoms), were mostly used to date for beam
manipulation applications. In this paper, we show that the appealing
diffraction engineering features of the MGs in such typical free-space periodic
scenarios can be utilized to efficiently mould fields inside waveguides (WGs).
In particular, we derive an analytical model allowing harnessing of the MG
concept for realization of perfect mode conversion in RWGs. Conveniently, the
formalism considers a printed-circuit-board (PCB) MG terminating the RWG,
operating as a reflect-mode MC. Following the typical MG synthesis approach,
the model directly ties the meta-atom position and geometry with the modal
reflection coefficients, enabling resolution of the detailed fabrication-ready
design by enforcement of the functionality constraints: elimination of the
fundamental $\mbox{TE}_{10}$ reflection and power conservation (passive
lossless MG). This reliable semianaltyical scheme, verified via full-wave
simulations and laboratory measurements, establishes a simple and efficient
alternative to common RWG MCs, typically requiring challenging deformation of
the WG designed through time-consuming full-wave optimization. In addition, it
highlights the immense potential MGs encompass for a wide variety of
applications beyond beam manipulation.
