In this paper, we introduce a free field representation of SU(2)K Kač-Moody algebras and the related ZK-parafermion theories. Using this representation, we calculate the associated BRS cohomology, and thereby derive the character formulae for these theories. The resulting expressions yield a new representation of the "string functions" of Kač and Peterson. The generalization to other Kač-Moody algebras is sketched. © 1990.