The QCD phase diagram might exhibit a first order phase transition for large baryochemical potentials. We explore the cosmological implications of such a QCD phase transition in the early universe. We propose that the large baryon-asymmetry is diluted by a little inflation where the universe is trapped in a false vacuum state of QCD. The little inflation is stopped by bubble nucleation which leads to primordial production of the seeds of extragalactic magnetic fields, primordial black holes and gravitational waves. In addition the power spectrum of cold dark matter can be affected up to mass scales of a billion solar masses. The imprints of the cosmological QCD phase transition on the gravitational wave background can be explored with the future gravitational wave detectors LISA and BBO and with pulsar timing.