  We describe a 3d analog of the Jordan-Wigner transformation which maps an
arbitrary fermionic system on a 3d spatial lattice to a 2-form $\mathbb{Z}_2$
gauge theory with an unusual Gauss law. An important property of this map is
that it preserves the locality of the Hamiltonian. The map depends explicitly
on the choice of a spin structure of the spatial manifold. We give examples of
3d bosonic systems dual to free fermions. We also describe the corresponding
Euclidean lattice models, which is analogous to the generalized Steenrod square
term in (3+1)D (compared to the Chern-Simon term in (2+1)D).
