The low-energy physics of systems with spontaneously broken continuous symmetry is dominated by the ensuing Nambu-Goldstone bosons. It has been known for half a century how to construct invariant Lagrangian densities for the low-energy effective theory of Nambu-Goldstone bosons. Contributions, invariant only up to a surface term - also known as the Wess-Zumino (WZ) terms - are more subtle, and as a rule are topological in nature. Although WZ terms have been studied intensively in theoretically oriented literature, explicit expressions do not seem to be available in sufficient generality in a form suitable for practical applications. Here we construct the WZ terms in d = 1, 2,3,4 spacetime dimensions for an arbitrary compact, semisimple and simply connected symmetry group G and its arbitrary connected unbroken subgroup H, provided that the d-th homotopy group of the coset space G/H is trivial. Coupling to gauge fields for the whole group G is included throughout the construction. We list a number of explicit matrix expressions for the WZ terms in four spacetime dimensions, including those for QCD-like theories, that is vector-like gauge theories with fermions in a complex, real or pseudoreal representation of the gauge group. (C) 2019 The Author(s). Published by Elsevier B.V.