Analytical theory for second harmonic nonlinear electrochemical impedance spectroscopy (2nd-NLEIS) of planar and porous electrodes is developed for interfaces governed by Butler-Volmer kinetics, a Helmholtz (mainly) or Gouy-Chapman (introduced) double layer, and transport by ion migration and diffusion. A continuum of analytical EIS and 2nd-NLEIS models is presented, from nonlinear Randles circuits with or without diffusion impedances to nonlinear macrohomogeneous porous electrode theory that is shown to be analogous to a nonlinear transmission-line model. EIS and 2nd-NLEIS for planar electrodes share classic charge transfer RC and diffusion time-scales, whereas porous electrode EIS and 2nd-NLEIS share three characteristic time constants. In both cases, the magnitude of 2nd-NLEIS is proportional to nonlinear charge transfer asymmetry and thermodynamic curvature parameters. The phase behavior of 2nd-NLEIS is more complex and model-sensitive than in EIS, with half-cell NLEIS spectra potentially traversing all four quadrants of a Nyquist plot. We explore the power of simultaneously analyzing the linear EIS and 2nd-NLEIS spectra for two-electrode configurations, where the full-cell linear EIS signal arises from the sum of the half-cell spectra, while the 2nd-NLEIS signal arises from their difference.