Marks the precise moment when one situation is happening and another event intrudes upon it. It means 'just when ~' or 'right as ~ (something else happened)'. The second event is typically an interruption, arrival, or intervention. へ leans slightly more toward physical arrival, に toward timing.
[Verb (て-いる / た / dictionary) / い-adj / Noの] + ところに/ところへ
出かけようとしたところに、電話がかかってきた。
Dekakeyou to shita tokoro ni, denwa ga kakatte kita.
Just as I was about to leave, the phone rang.
ところに marks the exact moment of leaving when the phone interrupted.
困っているところへ、友達が助けに来てくれた。
Komatte iru tokoro e, tomodachi ga tasuke ni kite kureta.
Right when I was in trouble, a friend came to help.
ところへ emphasizes the friend's arrival at that critical moment.
寝ているところに、誰かがドアをノックした。
Nete iru tokoro ni, dareka ga doa o nokku shita.
Just as I was sleeping, someone knocked on the door.
ところに sets the ongoing state that the knock interrupts.
• The intruding event is usually sudden and often involves a person arriving or contacting you. • Verb tense before ところ shows timing: ている (during), た (just after), dictionary/よう (just before). • へ subtly stresses movement/arrival; に stresses the point in time.
The JLPT rarely asks whether you recognise a pattern — it asks which of several similar patterns fits. These are the ones ~ところに/~ところへ is tested against.
ときに just states 'when', while ところに stresses a critical, ongoing moment suddenly interrupted by another event.
ところを marks the situation as the direct object of the interrupting action (e.g. being caught doing something), while ところに marks it as the time/point of arrival.
Study Japanese grammar on LenGaki

Get the Android app
The app adds offline study, home-screen widgets, stroke-order tracing, speaking practice with pronunciation scoring, and an AI tutor that answers questions in context — none of which fits in a browser tab.