〜ことはない
There's no need tomachine translation
FormationVerb dictionary form + ことはない
〜ことはない is used to say "there's no need to, no reason to do that": 時間は十分あるから、急ぐことはない (we have plenty of time, so there's no need to hurry). This pattern comes up a lot when comforting or reassuring someone who is worried or blaming themselves: 君が謝ることはないよ (you have no reason to apologize).
Connection: verb dictionary form + ことはない. The polite form is ことはありません.
You already know 〜なくてもいい ("you don't have to") — a neutral statement of permission. ことはない is stronger than that: the speaker actively denies the necessity, with an advising tone of "doing that would be pointless, a waste." Also don't mix it up with 〜ないことはない: they look similar, but ないことはない is a double negative meaning "it's not that… not…," which is completely different from "no need to."
Examples
時間は十分あるから、急ぐことはない。
We have plenty of time, so there's no need to hurry.
君が謝ることはないよ。悪いのは彼だ。
You have no reason to apologize. He's the one at fault.
そんなに心配することはありません。
There's no need to worry that much.