If your brakes fail while driving, take these actions quickly:
Pump the brakes: Press the brake pedal rapidly several times. This might build up enough pressure to get some braking effect if there’s any brake fluid left in the system.
Downshift: Shift into a lower gear to let the engine help slow the car (engine braking). In an automatic, you can usually drop it into “L” or the lowest gear. In a manual, downshift gear by gear.
Apply the parking brake gradually: Carefully pull the emergency/parking brake. Do it slowly and steadily – if you yank it too fast, the wheels could lock up and send you into a skid. The parking brake typically only works on the rear wheels, so be prepared for some swerving and correct it by steering.
Warn others and move to safety: Turn on your hazard lights to alert other drivers that something is wrong. Honk if necessary. Try to steer the car toward the right shoulder or an off-ramp/exit. Look for a safe area like a gravel runoff or grass. As you do this, continue trying the brakes and parking brake.
Stop the car and get help: Once you’ve slowed down enough, get completely off the road if you can and let the car come to a stop (perhaps by going uphill or just coasting to a stop). If you had to use something like scraping a guardrail or bushes to stop, that’s okay — your life is more important than the car. After the car is stopped, leave the hazard lights on. Do not attempt to drive again. You’ll need to call for a tow or mechanical help to fix the brakes.
The main thing is to stay calm. Losing brakes is scary, but if you react quickly with these steps, you can usually get the car slowed and off the road. Always remember to periodically check your brakes (and brake fluid) as part of vehicle maintenance to prevent brake failure in the first place. But if it happens: pump brakes, downshift, use the parking brake, and find a safe way off the road.