0) Let us for simplicity assume that the Legendre transformation from Lagrangian to Hamiltonian formulation is regular.
1) The Lagrangian action $S_L[q]:=\int dt~L$ is invariant under the infinite-dimensional group of diffeomorphisms of the $n$-dimensional (generalized) position space $M$.
2) The Hamiltonian action $S_H[q,p]:=\int dt(p_i \dot{q}^i -H)$ is invariant (up to boundary terms) under the infinite-dimensional group of symplectomorphisms of the $2n$-dimensional phase space $T^*M$.
3) The group of diffeomorphisms of position space can be prolonged onto a subgroup inside the group of symplectomorphisms. (But the group of symplectomorphism is much bigger.) The above is phrased in the active picture. We can also rephrase it in the passive picture of coordinate transformations. Then we can prolong a coordinate transformation
$$q^i ~\longrightarrow~ q^{\prime j}~=~q^{\prime j}(q)$$
into the cotangent bundle $T^*M$ in the standard fashion
$$ p_i ~=~ p^{\prime}_j \frac{\partial q^{\prime j} }{\partial q^i} ~.$$
It is not hard to check that the symplectic two-form becomes invariant
$$dp^{\prime}_j \wedge dq^{\prime j}~=~ dp_i \wedge dq^i $$
(which corresponds to a symplectomorphism in the active picture).
This post has been migrated from (A51.SE)