Can I squat with runner's knee?
Yes, but trim the depth for now. Squatting isn't dangerous with runner's knee, and quitting it entirely usually isn't necessary. Increasing depth or weight can make a squat more demanding on the kneecap. Deep squats commonly bring on symptoms. Squat to the depth that stays mildly uncomfortable at most, and keep the next-morning rule: if it's clearly worse the next day, that session was too much.
How to keep squatting through rehab
Start with a comfortable range, often to parallel or above, and easy load. A box or bench behind you makes depth consistent. As the weeks pass and the joint calms, earn range and load back gradually. The squat itself becomes part of the rebuild, because progressive knee loading is exactly what guidelines recommend.
If even shallow squats stay sharp, switch to gentler static quad work for a while, which loads the quad with far less irritation, then re-test the squat.
Don't skip the hips
Squats alone under-train the hip muscles that steer the kneecap, and weak hip abductors are a common part of the runner's knee story. Pair squat work with direct hip strengthening for the combined program the evidence supports.
Full guide for Runner’s Knee · Sources for the full guide