必须 and 必需 have the same pronunciation, but they can not be used interchangeably. Here are the tips on how to differentiate between 必须 and 必需.
必须 [bì xū] must, have to
can only be used before a verb or adjective to act as an adverbial and often used together with other verbs.
今天你必须上班。
Today you have to go to work.
这次考试我们必须及格。
We must pass the exam.
你必须好起来。
You have to be better.
必需 [bì xū] essential, indispensable, necessary
usually used before a noun as an attributive, or used as a predicate or object, but can’t be used before a verb
这些是发展工业所必需的原料。
These are the raw materials essential for industrial development。
植物生长必需阳光和水。
Sunlight and water essential for plant growth.
这些参考书是我们所必需的。
These reference books are necessary to us.
☆☆☆☆☆ 必需 can form new words, e.g. 必需品, 必需营养素, 必需氨基酸, etc, but 必须 does not have this use.
See also:
What is the difference between “二” and “两”?