How do You Say Good Night in French?

If you put ‘good’ and ‘night’ together it is ‘bonsoir’ in the French language. If you separate them, then the translation is ‘bonne nuit.’ Kind of interesting how it changes based on whether you say ‘goodnight’ or ‘good night.’