While there are minimal safety risks to pumping your gas with the car still running, it is however not permitted by law and is illegal. It is illegal to pump gas with the car still running in all 50 states. Before you can refuel therefore you must always turn off the car.