  In this paper we study the isotopism classes of two-step nilpotent algebras.
We show that every nilpotent Leibniz algebra $\mathfrak{g}$ with
$\operatorname{dim}[\mathfrak{g},\mathfrak{g}]=1$ is isotopic to the Heisenberg
Lie algebra or to the Heisenberg algebra $\mathfrak{l}_{2n+1}^{J_1}$, where
$J_1$ is the $n \times n$ Jordan block of eigenvalue 1. We also prove that two
such algebras are isotopic if and only if the Lie racks integrating them are
isotopic. This gives the classification of Lie racks whose tangent space at the
unit element is a nilpotent Leibniz algebra with one-dimensional commutator
ideal. Eventually, we introduce new isotopism invariants for Leibniz algebras
and Lie racks.
