We report on the implications for cosmic inflation of the 2018 release of the Planck cosmic microwave background (CMB) anisotropy measurements. The results are fully consistent with those reported using the data from the two previous Planck cosmological releases, but have smaller uncertainties thanks to improvements in the characterization of polarization at low and high multipoles. Planck temperature, polarization, and lensing data determine the spectral index of scalar perturbations to be ns = 0.9649 ± 0.0042 at 68% CL. We find no evidence for a scale dependence of ns, either as a running or as a running of the running. The Universe is found to be consistent with spatial flatness with a precision of 0.4% at 95% CL by combining Planck with a compilation of baryon acoustic oscillation data. The Planck 95% CL upper limit on the tensor-to-scalar ratio, r0.002 < 0.10, is further tightened by combining with the BICEP2/Keck Array BK15 data to obtain r0.002 < 0.056. In the framework of standard single-field inflationary models with Einstein gravity, these results imply that: (a) the predictions of slow-roll models with a concave potential, V″(φ) < 0, are increasingly favoured by the data; and (b) based on two different methods for reconstructing the inflaton potential, we find no evidence for dynamics beyond slow roll. Three different methods for the non-parametric reconstruction of the primordial power spectrum consistently confirm a pure power law in the range of comoving scales 0.005 Mpc-1 k 0.2 Mpc-1. A complementary analysis also finds no evidence for theoretically motivated parameterized features in the Planck power spectra. For the case of oscillatory features that are logarithmic or linear in k, this result is further strengthened by a new combined analysis including the Planck bispectrum data. The new Planck polarization data provide a stringent test of the adiabaticity of the initial conditions for the cosmological fluctuations. In correlated, mixed adiabatic and isocurvature models, the non-adiabatic contribution to the observed CMB temperature variance is constrained to 1.3%, 1.7%, and 1.7% at 95% CL for cold dark matter, neutrino density, and neutrino velocity, respectively. Planck power spectra plus lensing set constraints on the amplitude of compensated cold dark matter-baryon isocurvature perturbations that are consistent with current complementary measurements. The polarization data also provide improved constraints on inflationary models that predict a small statistically anisotropic quadupolar modulation of the primordial fluctuations. However, the polarization data do not support physical models for a scale-dependent dipolar modulation. All these findings support the key predictions of the standard single-field inflationary models, which will be further tested by future cosmological observations.