Quick difference: Use if to introduce a condition, as in If the library closes early, use the return box. Both if and whether can introduce many indirect yes-or-no questions. I asked if the library was open and I asked whether the library was open report the same question.

Use whether in these patterns
Before an infinitive. We’re deciding whether to renew the book. You can also use whether at the start of a sentence, as in Whether the library opens on Sunday depends on staffing.
After a preposition. Our plans depend on whether the library is open.
Directly before or not. Tell me whether or not the library is open. With or not at the end, Tell me if the library is open or not also works.
Avoid a double reading
Let me know if the library closes early could ask for a yes-or-no answer or for a message only in the event of an early closure. Let me know whether the library closes early asks for an answer either way. That small change removes the ambiguity.
One more way to tell
Keep statement order in an embedded question. Does the scanner work? becomes Ari wants to know whether the scanner works (or if the scanner works). After a preposition or immediately before an infinitive, use whether: We talked about whether it works; we decided whether to replace it.
Place or not carefully. Use whether or not the printer is online or if the printer is online or not. When the result is the same either way, use whether: Whether or not it rains, we’ll meet at six.
Try it: Rewrite “Email me if the door is unlocked” to require a reply either way.
Please email me and tell me whether the door is unlocked. The request stands on its own, and the whether clause tells the recipient what to report.
Quick check
Choose the word that fits the meaning and context.
- ___ the library closes early, use the return box.
- We are deciding ___ to renew the book.
Reveal the answers and explanations
1. If. This introduces the condition under which you should use the box.
2. whether. Use whether, not if, directly before to renew.