We designed a TE0-TE2 bidirectional mode converter using subwavelength gratings.The dimensions of the converter were optimized through particle swarm optimization. The conversion efficiency of the converter is over 93.5% within a 1500-1600 nm bandwidth.