Quick answer
menos mal
Natural: thank goodness / just as well
Literal: “less bad”
How it is used
¡Menos mal!Thank goodness!
Menos mal que llegaste.Thank goodness you arrived.
Menos mal que no llovió.Just as well it didn’t rain.
Menos mal que te lo dije.Good thing I told you.
Where it is said
It works across the whole Spanish-speaking world, and <b>gracias a Dios</b> covers the same ground with a religious tone.
A mini dialogue
— Al final encontré las llaves.— I found the keys in the end.
— ¡Menos mal!— Thank goodness!
Watch out
menos mal
When a clause follows, you need que: say menos mal que vino, not menos mal vino.
Check yourself
Which sentence is correct?