N2
には
In order to, In regard to, For
海外に行くにはパスポートが必要です。
You need a passport in order to travel abroad.
Explanation
「には」 has 3 uses
1In order to
After a dictionary-form verb or a noun (移動, 出産, 通勤), followed by what it takes: 「N2に合格するには、毎日の積み重ねが不可欠だ」 (to pass N2, steady daily work is a must).
「移動にはスクーターを使ったらどう?」
'What about using a scooter for transportation?'
このホームセンターは会員制なので、買い物をするには会員登録が必要です。
Since this home improvement store is only open to members, you will need to sign up in order to shop here.
2For (someone)
After a person: judged from that person's side: 「私には難しすぎる」 (it's too hard for me).
この本は子供には難しすぎるだろう。
This book is probably too difficult for children.
この問題は、小学生には難しすぎる。
This problem is too hard for primary school children.
3In (a place)
After a place, made the topic, saying what is there: 「この本には面白い話がたくさん載っている」 (this book has lots of fun stories in it).
この部屋には、窓が二つある。
This room has two windows.
駅前には、新しいパン屋ができた。
A new bakery has opened in front of the station.
Mixed up with
「verb + には」 is about conditions: to do A, you must have B. What follows is something objectively needed, or time and money. 「駅まで歩くには20分かかる」 (It takes 20 minutes to walk to the station).
Usually it cannot be followed by your own one-off action of will: not 「×留学するにはお金を貯めた」.
「ために」 is about purpose and action: 「留学するために、アルバイトをしてお金を貯めた」 (I worked part-time and saved money in order to study abroad).