Our main result is that any topological algebra based on a Boolean space is the extended Stone dual space of a certain associated Boolean algebra with additional operations. A particular case of this result is that the profinite completion of any abstract algebra is the extended Stone dual space of the Boolean algebra of recognisable subsets of the abstract algebra endowed with certain residuation operations. These results identify a connection between topological algebra as applied in algebra and Stone duality as applied in logic, and show that the notion of recognition originating in computer science is intrinsic to profinite completion in mathematics in general. This connection underlies a number of recent results in automata theory including a generalisation of Eilenberg–Reiterman theory for regular languages and a new notion of compact recognition applicable beyond the setting of regular languages. The purpose of this paper is to give the underlying duality theoretic result in its general form. Further we illustrate the power of the result by providing a few applications in topological algebra and language theory. In particular, we give a simple proof of the fact that any topological algebra quotient of a profinite algebra which is again based on a Boolean space is again profinite and we derive the conditions dual to the ones of the original Eilenberg theorem in a fully modular manner. We cast our results in the setting of extended Priestley duality for distributive lattices with additional operations as some classes of languages of interest in automata theory fail to be closed under complementation.