A systematic analysis is made of the character of the free and free abelian topological groups on metrizable spaces and compact spaces, and on certain other closely related spaces. In the first case, it is shown that the characters of the free and the free abelian topological groups on X are both equal to the “small cardinal” d if X is compact and metrizable, but also, more generally, if X is a non-discrete k!-space all of whose compact subsets are metrizable, or if X is a non-discrete Polish space. An example is given of a zero-dimensional separable metric space for which both characters are equal to the cardinal of the continuum. In the case of a compact space X, an explicit formula is derived for the character of the free topological group on X involving no cardinal invariant of X other than its weight; in particular the character is fully determined by the weight in the compact case. This paper is a sequel to a paper by the same authors in which the characters of the free groups were analysed under less restrictive topological assumptions.