If you really don’t want anyone to know, then just don’t tell anyone.
If you want to keep it a secret, then just don’t tell anyone.
❶ If you really don’t want anyone to know, then just don’t tell anyone.
(本当に誰にも知られたくないなら、誰にも話さなければいい)。
❷ If you want to keep it a secret, then just don’t tell anyone.
(秘密にしたいんだったら、誰にも言わなければいい)。
Then just don’t tell anyone の代わりに then just keep your mouth shut (黙っとけばいい)。とも言えます。キツイ言い方ですが…
If you really want to keep a secret to yourself, don't mention it to one soul.
この場合、次のような言い方ができますよ。
ーIf you really want to keep a secret to yourself, don't mention it to one soul.
「自分だけの秘密にしたいなら、誰にも話してはいけない」
to keep a secret to yourself で「自分だけの秘密にする」と言えます。
ご参考まで!