Shunting, known in NTSC regions as switching, is the act of sorting around train cars. It commonly takes place in yards, stations, depots, and other industries. Shunting is a complex task, and only the hardest-working railroaders shunt with ease.

A locomotive designed for shunting is a shunter or switcher.