A measurement of total and fiducial inclusive W and Z boson production cross sections in pp collisions at sqrt[s] = 8 TeV is presented. Electron and muon final states are analyzed in a data sample collected with the CMS detector corresponding to an integrated luminosity of 18.2 ± 0.5 pb(-1). The measured total inclusive cross sections times branching fractions are σ(pp → WX)×B(W → ℓν) = 12.21 ± 0.03(stat) ± 0.24(syst) ± 0.32(lum) nb and σ(pp → ZX) × B(Z → ℓ+ℓ-) = 1.15 ± 0.01(stat) ± 0.02(syst) ± 0.03(lum) nb for the dilepton mass in the range of 60-120 GeV. The measured values agree with next-to-next-to-leading-order QCD cross section calculations. Ratios of cross sections are reported with a precision of 2%. This is the first measurement of inclusive W and Z boson production in proton-proton collisions at sqrt[s] = 8 TeV.