  Given a rank-two sub-Riemannian structure $(M,\Delta)$ and a point $x_0\in
M$, a singular curve is a critical point of the endpoint map
$F:\gamma\mapsto\gamma(1)$ defined on the space of horizontal curves starting
at $x_0$. The typical least degenerate singular curves of these structures are
called \emph{regular singular curves}; they are \emph{nice} if their endpoint
is not conjugate along $\gamma$. The main goal of this paper is to show that
locally around a nice singular curve $\gamma$, once we choose a suitable
topology on the control space we can find a normal form for the endpoint map,
in which $F$ writes as a sum of a linear map and a quadratic form. We also
study the restriction of $F$ to the level sets of the action functional and
give a Morse-like formula for the inertia index of its Hessian at $\gamma$.
This is a preparation for a forthcoming generalization of the Morse theory to
rank-two sub-Riemannian structures.
