[noun (time expression)] + までに
[verb (plain form)] + までに
The particle combination までに expresses a deadline – it means "by" or "by the time" something happens. It indicates that an action must be completed before or at a certain point in time.
When attached to a noun indicating time, までに sets a deadline for completing an action.
When attached to a verb in plain form, までに means "by the time that ~ happens." The verb before までに describes an event, and the main clause describes what should be done before that event.
It is important not to confuse までに with まで ("until").
まで indicates that an action continues up to a certain point in time:
までに indicates that an action must be completed by a certain point in time:
With まで, the action is ongoing throughout the period. With までに, the focus is on the deadline for completion – the action itself may happen at any point before that time.