In this work Polyaniline and its doped state with microfiber morphologies were easily synthesized by chemical route under the oxidative polymerization, in which the polymerization was performed in an acidic medium (Protonic acids). In situ polymerization of aniline reacts with the chloride and sulfate ions of hydrochloric and sulfuric acid, respectively. microfiber like morphology of undoped and HCl doped PANI was observerd. The X-Ray diffraction patterns represented that, H2SO4 doped PANI was crystalline in nature. The effects of dopant acids on its optical properties were discussed. The strong interaction between chloride and sulfate ions with the ammonium group of PANI has been explained. The microfiber and granular morphology for HCl and H2SO4 doped PANI were observed. The redshifts observed for the microfiber nature of doped PANI. These analytical results confirmed that the prepared PANI was in the doped state. Further we found that prepared PANI will be used for the fabrication of polymer solar cells.