Two different cationic tetraphenyl porphyrins, one with two carboxyphenyl groups in cis-position and the other in trans-position (cis- and trans-H(4)DCPP(2+)), have been examined to control the structure of their 2D supramolecular assemblies in 0.05 M H(2)SO(4) at electrochemical interfaces. Electrochemical scanning tunneling microscopy (EC-STM) images revealed the formation of supramolecularly organized nanostructures of cis-H(4)DCPP(2+) such as dimer, trimer, and tetramer on the (square root(3) x square root(7)) sulfate/bisulfate adlayer, suggesting the importance of both electrostatic interaction between cationic porphyrin core and sulfate/bisulfate adlayer and the hydrogen bond formation between carboxyl groups of the nearest neighbor cationic porphyrins. Trans-H(4)DCPP(4+) ions were also found to be aligned in the square root(3) direction of the sulfate/bisulfate adlayer. The structure of these cationic porphyrin adlayers was found to depend upon the electrode potential; i.e., when the potential was changed in the negative direction, the (square root(3) x square root(7)) sulfate/bisulfate adlayer disappeared, and no ordered arrays were formed. In contrast, when 0.1 M HClO(4) was used as an electrolyte solution, only a disordered array was observed. The results of the present study indicate that the (square root(3) x square root(7)) sulfate/bisulfate adlayer formed on Au(111) in 0.05 M H(2)SO(4) plays a significant role as a nanorail template in the control of electrostatically assembled diacid porphyrin dicarboxylic acid derivative. In addition, the high-resolution STM clearly distinguished between cis-H(4)DCPP(2+) ion and cis-H(2)DCPP molecule. The cis-H(2)DCPP molecules on Au(111) provided an adlayer structure and an electrochemical behavior which are different from those of cis-H(4)DCPP(2+) ions.