までにby; no later than
までに sets a deadline. Something gets done at that time or at any moment before it: "by Friday", "by the time you leave".
by a time
Please submit the application form by Friday.
by the time something happens
Please be in your seat by the time the exam begins.
By a time
Time + までに
A clock time, a day, a date: 五時までに, 金曜日までに, 来月までに. To ask: いつまでに, 何時までに. What follows is something that gets done, such as 出す, 返す, 来る or 終わる, not something that goes on.
By the time something happens
Verb (dictionary form) + までに
出かけるまでに, "by the time I go out".
A deadline
That time is the limit, and earlier is fine. If a form is due 金曜日までに, Wednesday is on time. So is Friday: the day you name still counts.
I will reply by tomorrow morning.
The meeting will end by 3 p.m.
He sent the manuscript by the deadline.
What time should I be back by?
By two, please.
までにお願いします is how a deadline is given at work. English says "be back"; Japanese says 戻る, the coming back itself.
まで or までに?
まで is "until": something goes on up to that point. までに is "by": something gets done at some moment before it. The に is the one in 五時に, which marks a point in time.
I will work until nine.
The work goes on, right up to nine.
I will finish the report by nine.
Finishing happens once, at nine or before.
に alone is "at" that time. 寝る is both "go to bed" and "sleep", so it can take all three.
Not said: 金曜日まで
(Please hand in the report by Friday.)
Handing it in gets done; it doesn't go on: 金曜日までに.
Not said: 五時までに
(I'll wait here until five.)
Waiting goes on: 五時まで.
By the time something happens
A verb before までに stays in its dictionary form, even when the sentence is about the past. English often says "before".
I finished the laundry before leaving.
I want to visit Hokkaido once before I graduate.
I'll do my homework until my mother gets home.
The homework goes on until then.
I'll finish my homework by the time my mother gets home.
It gets finished at some moment before then.
Close neighbours
前にN5
"Before": it only says which comes first. までに makes that moment a limit.
I close the windows before leaving home.
間にN4
The same に: at some point within a stretch of time. までに names only where the time runs out.
I finished my independent research project during summer vacation.
Check yourself
1Which one fits?
作文は
Choose an answer to see why.
2A library notice says this. Is the 8th all right?
本は
Choose an answer to see why.
3Which one fits?
昨日は、
Choose an answer to see why.
More detail
までには
With は it is "by … at the latest", often to reassure someone.
I'll be home by eight at the latest.
までです
When the sentence ends on the deadline, it is usually までです, without に.
Applications close this Friday.
More sentences
I'll let you know my new address by the end of next month.