  We address the origin of Ultra-Diffuse Galaxies (UDGs), which have stellar
masses typical of dwarf galaxies but effective radii of Milky Way-sized
objects. Their formation mechanism, and whether they are failed $\rm L_{\star}$
galaxies or diffuse dwarfs, are challenging issues. Using zoom-in cosmological
simulations from the NIHAO project, we show that UDG analogues form naturally
in medium-mass haloes due to episodes of gas outflows associated with star
formation. The simulated UDGs live in isolated haloes of masses $10^{10-11}\rm
M_{\odot}$, have stellar masses of $10^{7-8.5}\rm M_{\odot}$, effective radii
larger than 1 kpc and dark matter cores. They show a broad range of colors, an
average S\'ersic index of 0.83, a typical distribution of halo spin and
concentration, and a non-negligible HI gas mass of $10^{7-9}\rm M_{\odot}$,
which correlates with the extent of the galaxy. Gas availability is crucial to
the internal processes that form UDGs: feedback driven gas outflows, and
subsequent dark matter and stellar expansion, are the key to reproduce faint,
yet unusually extended, galaxies. This scenario implies that UDGs represent a
dwarf population of low surface brightness galaxies and should exist in the
field. The largest isolated UDGs should contain more HI gas than less extended
dwarfs of similar $\rm M_{\star}$.
