*Accepted Paper*

**Inserted:** 28 mar 2018

**Last Updated:** 5 feb 2019

**Journal:** J. of Algebra

**Year:** 2018

**Doi:** 10.1016/j.jalgebra.2019.01.020

**Abstract:**

We illustrate an algorithm to classify nice nilpotent Lie algebras of dimension $n$ up to a suitable notion of equivalence; applying the algorithm, we obtain complete listings for $n\leq9$. On every nilpotent Lie algebra of dimension $\leq 7$, we determine the number of inequivalent nice bases, which can be $0$, $1$, or $2$. We show that any nilpotent Lie algebra of dimension $n$ has at most countably many inequivalent nice bases.