This paper presents a single phase multilevel inverter for using as a voltage harmonic source. First, a single phase multilevel inverter system is presented and the structural parts of the inverter are described. In order to obtain multilevel output voltage waveforms, a switching strategy based on calculating switching angles is explained and an improved formula for determining switching angles is given. Simulation and experimental results of multilevel voltage waveforms are given for 15, 31 and 127 levels. The proposed topology does not only produce output voltages with low THD values. It also produces the required harmonic components on the output voltage. For this purpose, equations for switching angles are constituted and the switching functions are obtained. These angles control the output voltage as well as provide the required specific harmonics. The proposed inverter structure is simulated for various functions with the required harmonic components. The THD values of the output voltage waves are calculated. The simulated functions are also realized by the proposed inverter structure. By using a harmonic analyzer, the harmonic spectrums, which belong to the output voltage forms, are found and the THD values are measured. Simulation and experimental results are given for the specific functions. The proposed topology produces perfectly suitable results for obtaining the specific harmonic components. Therefore, it is possible to use the structure as a voltage harmonic source in various applications.