The short answer
A pH crash happens when your KH buffer runs out and pH plummets suddenly. The fix is to restore KH gradually β not to yank pH back up fast, which shocks fish that have already adjusted to the low value. Do a series of small water changes with dechlorinated, KH-containing water, add a buffer if your source water is soft, and test as you go. Slow and steady wins: the goal is a stable tank again, not an instant βcorrectβ number.
Step 1 β bring it up gently
Start with modest water changes (around 15β20%) using fresh dechlorinated water that carries some KH. Spread them over hours or days so pH rises slowly. Resist the urge to dump in pH-up chemicals β a rapid swing back up is more dangerous to your fish than the crash itself.
Step 2 β rebuild the buffer
If your tap water is low in KH, the crash will simply return. Add crushed coral to the filter or substrate for a slow, self-regulating KH source, or dose a proper carbonate buffer. Confirm KH is climbing with a liquid test kit rather than guessing.
Step 3 β prevent the next one
Crashes are a KH-management problem. Keep a little KH in the tank as insurance, donβt skip water changes (which refresh the buffer), and go easy on acidifying driftwood, peat and CO2 if your buffer is thin.
Understand the mechanism in why pH drops and what a buffer is, and see general adjustment in raising or lowering pH. More in the water testing hub.