This paper investigates profinite completions of residually finite algebras, drawing on ideas from the theory of natural dualities. Given a class A = ISP(M), where M is a set, not necessarily finite, of finite algebras, it is shown that each A ∈ A embeds as a topologically dense subalgebra of a topological algebra n A (A) (its natural extension), and that n A (A) is isomorphic, topologically and algebraically, to the profinite completion of A. In addition it is shown how the natural extension may be concretely described as a certain family of relation-preserving maps; in the special case that M is finite and A possesses a single-sorted or multisorted natural duality, the relations to be preserved can be taken to be those belonging to a dualising set. For an algebra belonging to a finitely generated variety of lattice-based algebras, it is known that the profinite completion coincides with the canonical extension. In this situation the natural extension provides a new concrete realisation of the canonical extension, generalising the well-known representation of the canonical extension of a bounded distributive lattice as the lattice of up-sets of the underlying ordered set of its Priestley dual. The paper concludes with a survey of classes of algebras to which the main theorems do, and do not, apply.