We present the concept of customized van der Waals heterostructures with periodicity tailored to generate pre-designed X-ray patterns from free electrons. As an example, we demonstrate focused X-ray beams.