In this paper, the dispersion property of KTP is analyzed to calculate the group-velocity matching (GVM) wavelength at a given temperature. Then, first-order quasi-phasematching (QPM) broadband second harmonic generation (SHG) for two different types of interaction is studied at the calculated wavelength in periodically poled KTP (PPKTP). To broaden the acceptance bandwidth of QPM SHG, a structure of aperiodically poled KTP (APPKTP) is designed using a genetic algorithm with the QPM and GVM conditions satisfied simultaneously. Next, the broadband property of APPKTP is studied. Research shows that, for type-I QPM, the bandwidth at the communication band is ~1.9 nm in a 10 mm long PPKTP crystal with a set temperature of 22 °C, while a wide acceptance bandwidth of 73.9 nm can be obtained at the same waveband for type-II QPM, with the conversion efficiency decreasing to 4.64%. In addition, the maximum available acceptance bandwidths are ~9.3 nm for type-I QPM and 417.1 nm for type-II QPM, using the APPKTP designed above. The tradeoff between bandwidth and conversion efficiency is also discussed.