Detection of double JPEG compression is essential in the field of digital image forensics. Although double JPEG compression detection methods have greatly improved with the development of convolutional neural networks (CNNs), they rely on handcrafted features such as discrete cosine transform (DCT) histograms. In this Letter, the authors propose an end-to-end trainable 3D CNN in the DCT domain for double JPEG compression detection. Moreover, they also propose a new type of module, called feature rescaling, to insert the quantisation table into the network suitably. The experiments show that the proposed method outperforms state-of-the-art methods.