Two long-standing challenges for geophysical inverse problems are nonuniqueness (especially in the multiparameter setting) and the slow convergence of gradient-based optimization methods. We introduce shape-based inversion algorithms to address these challenges. The shape-based algorithms determine, based on the available geophysical data, the underlying subsurface structures (e.g., stratigraphic layers) and the spatially varying unknown physical parameters (e.g., velocity and density). Inverting simultaneously for geologic structures and physical parameters eliminates degeneracies between parameters and also provides a multiscale framework for decomposing the inverse problem. First, we provide a rigorous mathematical formulation of shape-based algorithms through diffuse interface approximations. Then, we demonstrate the applicability of these algorithms to a range of synthetic model problems in traveltime tomography, full-waveform inversion, gradiometry, and history matching of single-phase flow. These examples highlight the ability of shape-based inversion to mitigate nonuniqueness and improve the rate of convergence to a physically realistic solution.