The remarkable basicity of guanidine is attributed to the fact that the positive charge on
the guanidinium ion is delocalized equally over the three nitrogen atoms, as shown by
these three equivalent resonating structures:
Basicity of nitrogen can be increased by attachment to pi-donors (NH2) group. These two pi-donating NH2 groups donate electron density to the (pi-accepting) C=NH. Hence, the guanidinium ion is a highly stable cation.