We study in detail the ratchetlike dynamics of topological solitons in homogeneous nonlinear Klein-Gordon systems driven by a biharmonic force. By using a collective coordinate approach with two degrees of freedom, namely the center of the soliton, X͑t͒, and its width, l͑t͒, we show, first, that energy is inhomogeneously pumped into the system, generating as result a directed motion; and, second, that the breaking of the time shift symmetry gives rise to a resonance mechanism that takes place whenever the width l͑t͒ oscillates with at least one frequency of the external ac force. In addition, we show that for the appearance of soliton ratchets, it is also necessary to break the time-reversal symmetry. We analyze in detail the effects of dissipation in the system, calculating the average velocity of the soliton as a function of the ac force and the damping. We find current reversal phenomena depending on the parameter choice and discuss the important role played by the phases of the ac force. Our analytical calculations are confirmed by numerical simulations of the full partial differential equations of the sine-Gordon and 4 systems, which are seen to exhibit the same qualitative behavior. Ratchet, or rectification, phenomena in nonlinear nonequilibrium systems are receiving a great deal of attention in the past few years. A typical example of a ratchet occurs when pointlike particles are driven by deterministic or nonwhite stochastic forces. Under certain conditions related to the breaking of symmetries, unidirectional motion can take place although the applied force has zero average in time. The broken symmetries can be spatial, by introducing an asymmetric potential, or temporal, by using asymmetric periodic forces. This effect has found many applications in the design of devices for rectification or separation of different particles. Recently, ratchet dynamics is being studied in the context of solitons, trying to understand whether the fact that solitons, or nonlinear coherent excitations in general, are extended objects, allows for similar rectification phenomena. In nonlinear Klein-Gordon systems, it has been shown that ratchetlike behavior can be observed when driven by asymmetric periodic forces. However, the phenomenon is different from that seen in pointlike particles as the deformations of the soliton play a crucial role. In this paper we describe in detail these phenomena, analyze the mathematical conditions for its existence, explain the underlying mechanism originating the net motion, and study the highly nontrivial effects of dissipation on the motion. Our results may be related to recent observations of rectification in Josephson junctions and optical lattices.