We introduce a framework for analyzing and designing EIS inversion algorithms. Our framework stems from the observation of four features common to well-defined EIS inversion algorithms, namely (1) the representation of unknown distributions, (2) the minimization of a metric of error to estimate parameters arising from the chosen representation, subject to constraints on (3) the complexity control parameters, and (4) a means for choosing optimal control parameter values. These features must be present to overcome the ill-posed nature of EIS inversion problems. We review three established EIS inversion algorithms to illustrate the pervasiveness of these features, and show the utility of the framework by resolving ambiguities concerning three more algorithms. Our framework is then used to design the generalized EIS inversion (gEISi) algorithm, which uses Gaussian basis function representation, modality control parameter, and cross-validation for choosing the optimal control parameter value. The gEISi algorithm is applicable to the generalized EIS inversion problem, which allows for a wider range of underlying models. We also considered the construction of credible intervals for distributions arising from the algorithm. The algorithm is able to accurately reproduce distributions which have been difficult to obtain using existing algorithms. It is provided gratis on the repository https://github.com/suryaeff/gEISi.git.