[verb ない-form 〜ない → 〜なくて] + もいい [i-adj 〜い → 〜くなくて] + もいい [na-adj] + じゃなくて / ではなくて + もいい [noun] + じゃなくて / ではなくて + もいい
なくてもいい means "you don't have to": the action isn't required. Take the ない-form, change the final い to くて, and add もいい – 行かない becomes いかなくて行かなくてもいい.
The い of ない has to change. もいい does not go on ない itself.
"Do I have to?" is a question with なければなりませんか, and "no, you don't" is answered with なくてもいい. Asking with なくてもいいですか is asking to be let off.
The thing you are let off often becomes the topic, so を turns into は: this one, at least, you can skip.
These go beyond the verb with もいい.
Among friends, です goes, and often も as well: なくていい. なくてもだいじょうぶ大丈夫 says the same thing.
An い-adjective goes to 〜くなくても, and a noun or な-adjective takes じゃなくても.