Context. Vortex flows have been found in the photosphere, chromosphere, and low corona in observations and simulations. It has been suggested that vortices play an important role in channeling energy and plasma into the corona. However, the impact of vortex flows on the corona has not been studied directly in a realistic setup. Aims. We investigate the role vortices play for coronal heating using high-resolution simulations of coronal loops. The vortices are not artificially driven and they arise, instead, self-consistently from magnetoconvection. Methods. We performed 3D resistive (magnetohydrodynamic) MHD simulations with the MURaM code. Studying an isolated coronal loop in a Cartesian geometry allows us to resolve the structure of the loop interior. We conducted a statistical analysis to determine vortex properties as a function of height from the chromosphere into the corona. Results. We find that the energy injected into the loop is generated by internal coherent motions within strong magnetic elements. A significant part of the resulting Poynting flux is channeled through the chromosphere in vortex tubes forming a magnetic connection between the photosphere and corona. Vortices can form contiguous structures that reach up to coronal heights, but in the corona itself, the vortex tubes get deformed and eventually lose their identity with increasing height. Vortices show increased upward directed Poynting flux and heating rate in both the chromosphere and corona, but their effect becomes less pronounced with increasing height. Conclusions. While vortices play an important role for the energy transport and structuring in the chromosphere and low corona, their importance higher up in the atmosphere is less clear since the swirls are less distinguishable from their environment. Vortex tubes reaching the corona reveal a complex relationship with the coronal emission.