This paper proposes a compact and broadband coplanar waveguide (CPW)-to-rectangular waveguide (RWG) transition using a resonator with an impedance-matching element. The transition size is as small as 7.66 mm, and the frequency range for which the reflection coefficient is smaller than −15 dB covers from 8.05 GHz to 12.18 GHz (FBW = 40.83%), almost encompassing the full Xband (8.2-12.4 GHz). To reduce the size of the transition, a short-circuited stub phase shifter is used to replace the half-wavelength phase shifter, resulting in a miniaturized CPW-to-RWG transition using the resonator with the impedance-matching element. The transition size is further reduced from 7.7 mm to 5.9 mm. Besides, the frequency range for which the reflection coefficient is smaller than −15 dB covers from 8.05 GHz to 12.38 GHz (FBW = 42.38%), nearly encompassing the full X-band (8.2-12.4 GHz) as usual. To verify the simulation results, both CPW-to-RWG transitions using the resonator with the impedance-matching element are fabricated and measured. The simulation and measurement results are in reasonable agreement.