Expresses a deadline — an action must be completed by, or no later than, the stated time. Different from まで (until/up to), which marks continuation up to a point.
[Time / event] + までに + [action]
5時までに帰ってください。
Goji made ni kaette kudasai.
Please come home by 5 o'clock.
5時までに = by 5 o'clock (deadline)
夏休みが終わるまでに宿題を全部やった。
Natsuyasumi ga owaru made ni shukudai wo zenbu yatta.
I finished all my homework before summer break ended.
終わるまでに = by the time it ends (before that endpoint)
明日の朝までにレポートを提出してください。
Ashita no asa made ni repooto wo teishutsu shite kudasai.
Please submit the report by tomorrow morning.
明日の朝までに = by tomorrow morning (deadline)
• までに (deadline: by X) vs まで (continuation: until X): 6時まで働く (work UNTIL 6) vs 6時までに仕事を終わらせる (finish work BY 6). • までに → the action must be completed before the time point. • まで → the action continues up to the time point.
The JLPT rarely asks whether you recognise a pattern — it asks which of several similar patterns fits. These are the ones までに is tested against.
まで marks continuous action lasting up to a point (6時まで働く = work until 6); までに marks a one-time action that must be done before a deadline (6時までに終わる = finish by 6).
前に just means 'before [an event]' with no sense of deadline pressure; までに frames the time as a limit you must meet.
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.