Hadronization of heavy quarks reveals various unusual features. Gluon radiation by a heavy quark originated from a hard process, ceases shortly on a distance of the order of few fm. Due to the dead-cone effect a heavy quark radiates only a small fraction of its energy. This is why the measured fragmentation function D(z) peaks at large z. Hadronization finishes at very short distances, well shorter than 1 fm, by production of a colorless small-size Qq-bar dipole. This ensures dominance of a perturbative mechanism and makes possible factorization of short and long distances. The latter corresponds to final state interactions of the produced dipole propagating through a dense medium. The results provide good description of data on beauty and charm suppression in heavy ion collisions, fixing the transport coefficient for b-quarks about twice smaller than for charm, and both significantly lower that the values determined from data on suppression of high-pT light hadrons. We relate this to reduction of the QCD coupling at higher scales, and suppression of radiation by the dead-cone effect.