Must
Saya harus pergi. ‘I have to go.’
Kamu harus coba. ‘You have to try it.’
Mesti means the same and is more casual. Aku mesti pulang ‘I’ve got to head home’.
Need
Saya perlu obat. ‘I need medicine.’
Perlu bantuan? ‘Do you need help?’
Perlu works with a noun or a verb, and it is softer than harus: a need rather than a duty.
The negative that catches everyone
Tidak perlu and tidak usah mean you don’t have to. Tidak boleh means you must not.
Tidak usah bayar. ‘You don’t have to pay.’
Tidak boleh bayar. ‘You’re not allowed to pay.’
English uses “you mustn’t” for the second and “you don’t have to” for the first, and the two are easily blurred when translating in your head. In Indonesian they are different words with no overlap.
Tidak harus also exists and also means you don’t have to, but tidak usah is what people say.
Wajib
Wajib is compulsory in the official sense, and you will meet it on forms and signs rather than in speech.
Wajib pakai helm. ‘Helmets compulsory.’
Softening an obligation
Putting harus on someone directly can sound like an order. Two ways round it:
Sebaiknya kamu istirahat. ‘You’d better rest.’
Kalau bisa, tolong… ‘If you can, please…’
Sebaiknya is ‘it would be best if’, and it is the standard way to advise without instructing.
What you’ll actually hear
What the book says: Anda harus segera berangkat.
What you’ll hear: Mesti buruan nih.