  We give a full classification of 6-dimensional nilpotent Lie algebras over an
arbitrary field, including fields that are not algebraically closed and fields
of characteristic~2. To achieve the classification we use the action of the
automorphism group on the second cohomology space, as isomorphism types of
nilpotent Lie algebras correspond to orbits of subspaces under this action. In
some cases, these orbits are determined using geometric invariants, such as the
Gram determinant or the Arf invariant. As a byproduct, we completely determine,
for a 4-dimensional vector space $V$, the orbits of $\GL(V)$ on the set of
2-dimensional subspaces of $V\wedge V$.
