Used for goals that are outside your direct control, or to describe a desired state you are aiming toward. "So that / in such a way that."
[Potential / Negative / Intransitive verb, plain form] + ように
忘れないように、メモしました。
Wasurenai yō ni, memo shimashita.
I made a note so that I wouldn't forget.
Negative verb (state to avoid) + ように
早く歩けるように、リハビリをします。
Hayaku arukeru yō ni, rihabiri o shimasu.
I do rehab so that I can walk quickly.
Potential verb (歩ける) = a change in ability + ように
皆に聞こえるように、大きな声で話した。
Minna ni kikoeru yō ni, ōkina koe de hanashita.
I spoke loudly so that everyone could hear.
Intransitive verb (聞こえる) = natural/resulting state + ように
• The Limit Rule: Unlike ために (which takes volitional active verbs), ように prefers potential verbs, negative verbs, and intransitive verbs (states/abilities). • Hopes: Also used in wishes/prayers: 合格しますように ("I hope/pray I pass"). • Soft Requests: Use 〜ようにしてください for habitual or indirect requests.
The JLPT rarely asks whether you recognise a pattern — it asks which of several similar patterns fits. These are the ones ように is tested against.
ために needs a controllable action and the same subject; ように handles outcomes you can't fully control (ability, avoidance, others' actions) and can have a different subject.
ようにする means "make an effort to / try to (habitually)"; the ように here just links a clause to a goal ("so that").
ようになる describes reaching a new state/ability ("came to be able to"); the purpose ように expresses aiming toward such a state.
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.