We present libvdwxc, a general library for evaluating the energy and potential for the family of vdW-DF exchange–correlation functionals. libvdwxc provides an efficient implementation of the vdW-DF method and can be interfaced with various general-purpose DFT codes. Currently, the GPAW and Octopus codes implement interfaces to libvdwxc. The present implementation emphasizes scalability and parallel performance, and thereby enables ab initio calculations of nanometer-scale complexes. The numerical accuracy is benchmarked on the S22 test set whereas parallel performance is benchmarked on ligand-protected gold nanoparticles (Au144(SC11NH25)60) up to 9696 atoms.