We present QSFit, a new software package to automatically perform the analysis of Active Galactic Nuclei (AGN) optical spectra. The software provides luminosity estimates for the AGN continuum, the Balmer continuum, both optical and UV iron blended complex, host galaxy and emission lines, as well as width, velocity offset and equivalent width of 20 emission lines.Improving on a number of previous studies on AGN spectral analysis, QSFit fits all the components simultaneously, using an AGN continuum model which extends over the entire available spectrum, and is thus a probe of the actual AGN continuum whose estimates are scarcely influenced by localized features (e.g. emission lines) in the spectrum.We used QSFit to analyze 71,251 optical spectra of Type 1 AGN at z < 2 (obtained by the Sloan Digital Sky Survey, SDSS) and to produce a publicly available catalog of AGN spectral properties. Such catalog allowed us (for the first time) to estimate the AGN continuum slope and the Balmer continuum luminosity on a very large sample, and to show that there is no evident correlation between these quantities the redshift.All data in the catalog, the plots with best fitting model and residuals, and the IDL code we used to perform the analysis, are available on a dedicated website. The whole fitting process is customizable for specific needs, and can be extended to analyze spectra from other data sources. The ultimate purpose of QSFit is to allow astronomers to run standardized recipes to analyze the AGN data, in a simple, replicable and shareable way.