conjunction
for; for the sake of; on behalf of
Expresses purpose or benefit: doing something for someone or something, or for a goal. Follows nouns or dictionary-form verbs.
健康のために毎日歩いています。
I walk every day for my health.
家族のために料理を作った。
I cooked for my family.
conjunction
because of; due to; as a result of
Expresses cause or reason. Follows nouns, adjectives, or verbs in plain form. Often used with のだ/から structure when giving explanations.
雨のために試合が中止になった。
The game was canceled because of the rain.
道が混んでいたために遅刻した。
I was late because the roads were crowded.
Derived from the noun 為 (ため, 'benefit, sake') combined with the particle に. The kanji 為 is rarely used in modern writing for this conjunction.