In this thesis, I report on Terahertz filter design with particle swarm optimization (PSO) to achieve target transmission spectra. In order to apply the PSO algorithm, a plane of a perfect conductor was divided into many small square cells that can be “flip-flop” between perfect conductor and vacuum. I also applied the PSO algorithm to optimize the dimension of a perfect metal aperture of a certain shape. Numerical results demonstrate the effectiveness of these methods for one and two peak terahertz filters. This work can be further extended for three and four peak cases. Such filters are essential to the examination of different material characteristics in terahertz range. The developed PSO based filter design method is a promising tool for designing general electromagnetic devices such as filters and antenna.