The vector potential of a solenoidal vector field, if it exists, is not uni
que in general. Any procedure that aims to determine such a vector potentia
l typically involves a decision on how to fix it. This is referred to by th
e term gauging. Gauging is an important issue in computational electromagne
tism, whenever discrete vector potentials have to be computed. In this pape
r a new gauging algorithm for discrete vector potentials is introduced that
relies on a hierarchical multilevel decomposition. With minimum computatio
nal effort it yields vector potentials whose L-2-norm does not severely blo
w up. Thus the new approach compares favorably to the widely used co-tree g
auging.