We show that conformal maps of simply connected domains with an analytic boundary to a unit disk have an intimate relation to the dispersionless 2D Toda integrable hierarchy. The maps are determined by a particular solution to the hierarchy singled out by the conditions known as "string equations". The same hierarchy locally solves the 2D inverse potential problem, i.e., reconstruction of the domain out of a set of its harmonic moments. This is the same solution which is known to describe 2D gravity coupled to c = 1 matter. We also introduce a concept of the τ-function for analytic curves.