Copolymerization of self doping monomer aniline and oxalic acid (OA)/ acetic acid (AA) in different molar ratio via the self-assembly process were conducted to prepare self-doping polyanilines (SD-PANIs). In this polymerization process, AA or OA plays the roles of surfactant and dopant for the self-doping PANIs. The morphology, UV–Vis absorption behaviour, crystalline density and electrical conductivity of self-doped PANIs are investigated. Depending on molar ratio of aniline to OA/AA, nanotubes structure of polyaniline (PANI) can be formed. Higher concentration of OA leads to increase in the diameter of the tubes in which micelles act as the template in the self-assembly of PANI to form nanotube structures, whereas increase in concentration of AA leads to change the structure of polyaniline from microspheres to nanotubes. The nanotubular structure aggregates to form a bundle structure as the concentration of AA increases. More uniform structure is observed in case of OA than that of AA, which may be due to the bulky structure of OA than AA. Higher absorption intensity in UV-Vis spectra of self-doping PANIs was observed for lower concentration of OA/AA. The crystal structure for the synthesized self-doped PANIs is orthorhombic and the C-N-C angle is larger. High electrical conductivity of the self-doped PANIs was observed as a function of degree of doping.