Polyaniline and its nanocomposites have emerged as desirable electrode materials for supercapacitors. However, achieving specific capacitance with long-term cyclic stability is still a challenge. The present study reports on novel hierarchically porous and cross-linked polyaniline synthesized by a method employing aniline (monomer) and phytic acid (dopant acid) in the presence of octyltrimethyl ammonium bromide (OTAB) surfactant. The electrochemical performance of the phytic acid doped sample has been compared with HCl doped samples, the former being superior, i.e., a specific capacitance of 523 and 325 F g-1 at current densities of 0.25 and 10 A g-1, respectively. Additionally, the same possess excellent cycling stability with retention of ~88% of its initial capacitance over 10,000 charge-discharge cycles. Further, the phytic acid doped sample exhibited a lower equivalent series resistance (0.98 Ω cm2) than the HCl doped sample (1.26 Ω cm2). These results reveal the capability of the phytic acid doped hierarchical polyaniline sample as a promising active material for electrochemical applications. © 2020 Elsevier Ltd