We discuss the problem of classifying all local CR diffeomorphisms of a strictly pseudoconvex surface. Our method exploits the Tanaka--Webster pseudohermitian invariants, their transformation formulae, and the Chern--Moser invariants. Our main application concerns a class of generalized ellipsoids where we classify all local CR mappings.