Cause of Swollen ankles for 4 days?

See details. Pain is likely arthritis or inflammation, no pain is likely edema or fluid retention. Have a doctor evaluate it.
Sudden, see MD. If it is a sudden change, then this is highly concerning. This can be a sign of kidney problems or heart problems and would require at the very least blood tests for kidney function, vital signs for Blood pressure and pulses. Because it is happening on both sides it concerns me that a full exam needs to be done.