Interfaces play a key role in low dimensional materials like graphene or its boron nitrogen analog, white graphene. The edge energy of hexagonal boron nitride (h-BN) has not been determined as its lower symmetry makes it difficult to separate the opposite B-rich and N-rich zigzag sides. We report unambiguous energy values for arbitrary edges of BN, including the dependence on the elemental chemical potentials of B and N species. A useful manifestation of the additional Gibbs degree of freedom in the binary system, this dependence offers a way to control the morphology of pure BN or its carbon inclusions and to engineer their electronic and magnetic properties.