A boxcab, in railroad terminology, is a term for an electric locomotive in which the machinery and crew areas were enclosed in a box-like superstructure. Deriving from "boxcar", the term mainly occurs in North America. The term has rarely been applied to diesel locomotives. It was also applied in Australia to Victorian Railways' "E" class second series electric locomotives.
Boxcabs were either diesel or electric locomotives.
Most North American boxcabs were built a few years before and after 1930, the most prominent builders being Baldwin and Westinghouse, GE and Alco.