Ordinary and extraordinary wave couplings in the vicinity of the cutoff surfaces in magnetized plasmas are analyzed in a two-dimensionally inhomogeneous tokamak-like geometry. It is demonstrated that the mode conversion may be of an essentially two-dimensional nature when the cutoff surfaces intersect in space along a certain line. For the latter case the reduced wave equations in the transformation region are derived and solved analytically. Structures of the transformed and reflected waves and corresponding transformation coefficients are obtained for an arbitrary field distribution in the incident beam. In particular, the intensity transformation coefficients of Gaussian beams are analyzed in more detail.