We report a search for Higgs bosons that are produced via vector boson fusion and subsequently decay into invisible particles. The experimental signature is two energetic jets with TeV invariant mass and GeV missing transverse momentum. The analysis uses 36.1 fb of collision data at 13 TeV recorded by the ATLAS detector at the LHC. In the signal region the 2252 observed events are consistent with the background estimation. Assuming a 125 GeV particle with Standard Model cross sections, the upper limit on the branching fraction of the Higgs boson decay into invisible particles is 0.37 at 95% confidence level where 0.28 was expected. This limit is interpreted in Higgs portal models to set limits on the WIMP-nucleon scattering cross section. We also consider invisible decays of additional scalar bosons with masses up to 3 TeV for which the upper limits on the cross section times branching fraction are in the range of pb.