Castellfollit del Boix is a village and municipality in the province of Barcelona, in the autonomous community of Catalonia, Spain. It lies in the comarca of Bages, in the interior of Catalonia, northwest of the city of Barcelona.
The municipality covers an area of 58.9 square kilometres (22.7 square miles). Its population was recorded as 460 in 2014, making it a small and sparsely populated rural municipality.