A neutral beam injection (NBI) heating system for the stellarator project Wendelstein 7-X (W7-X) is currently under construction at the Max Planck Institute for Plasma Physics (IPP) Greifswald, Germany. The NBI at W7-X is based on the similar system in operation on the tokamak ASDEX Upgrade at IPP in Garching, Germany, and makes use of radio-frequency-driven positive ion sources. Two NBI injectors are going to be installed in W7-X, each being capable of hosting four ion sources. Initially each injector is being equipped with two ion sources of 1.8 (2.5) MW beam power each in H (D). Accelerated positive ions are going to be neutralized and transported inside an NBI-box, which also hosts a residual ion dump, titanium sublimation pumps and a calorimeter. The beams are focused at a point 6.5 m downstream of the ion sources and are injected into the plasma vessel of W7-X through two ports. The NBI boxes and their NBI ports are connected by NBI-torus interfaces, which are made of several components that minimize beam losses while protecting the port walls and bellows from energetic re-ionized particles and beam intersection. This paper describes the design of the NBI-torus interface, including the shape optimization of a beam scraper and the integration of beam diagnostics. (C) 2015 Elsevier B.V. All rights reserved.