〜んです
Explaining a reason or circumstancemachine translation
FormationPlain form + んです (noun / な-adjective + なんです)
〜んです is used when you explain a reason or circumstance, or when you want the listener to explain something to you. The question どうして〜んですか means "why is that?", and the answer usually ends in 〜んです as well.
How to connect: plain form + んです. Nouns and な-adjectives add な: 誕生日なんです, 好きなんです.
This is a spoken-language pattern. If you're just stating a plain fact with no explanatory intent, です・ます is enough — adding んです to every sentence sounds unnatural.
Examples
どうして来なかったんですか。
Why didn't you come that day?
頭が痛いんです。
It's because I have a headache.
今日は妹の誕生日なんです。
It's my younger sister's birthday today, you see.