In the inviscid limit the generalized complex Ginzburg–Landau equation reduces to the nonlinear Schrodinger equation. This limit is proved rigorously with H1 data in the whole space for the Cauchy problem and in the torus with periodic boundary conditions. The results are valid for nonlinearities with an arbitrary growth exponent in the defocusing case and with a subcritical or critical growth exponent at the level of L2 in the focusing case, in any spatial dimension. Furthermore, optimal convergence rates are proved. The proofs are based on estimates of the Schrodinger energy functional and on Gagliardo–Nirenberg inequalities.