This study is aimed to monitor the effects of varying the polymerization time of aniline on the morphology, electrical conductance, oxidation states, optical properties, and ammonia gas sensitivity of hydrochloric acid (HCl)-doped polyaniline (PAni) as the synthesized thin film. In this work, chemical oxidative polymerization of aniline was carried out using the rapid mixed method with ammonium peroxydisulfate, (NH4)2S2O8 as the oxidant and 0.4 M HCl as dopant. Temperature changes were also monitored from the start of the chemical reaction to describe the different phases of the chemical oxidative polymerization of aniline. The PAni thin films were deposited by taking the substrates from the reaction mixture after 2 minutes and 8 minutes polymerization time. FTIR spectroscopy, UV-vis spectroscopy and scanning electron microscopy (SEM) were used to conduct spectroscopic and morphological characterizations of the produced PAni, respectively. The two-probe method was used for electrical characterization of the samples. The FTIR spectrum of the 2-min deposited film with oxidation state of 43% revealed a band at 1309 cm-1 assigned to π-electron delocalization indicating that doping started at the onset of polymerization of aniline. With the 8-min deposited film, the C-N+. stretching vibration in the polaron structure confirmed the formation of emeraldine-salt oxidation state of PAni . Along with this, energy band gap values of about 3.65 and 3.72 eV were obtained from UV-vis analyses. The degree of oxidation, conductance and ammonia sensing responses of the two film samples increased with polymerization time. The degree of doping, however, has no significant relationship with increasing time of polymerization. SEM micrographs of the samples showed porous nanostructures with interconnected networks of globular formations. The film produced within 8-min polymerization period has better sensitivity than the one produced within 2 minutes.