Grammar › Nuance › 〜んです
〜んです
The "explanatory" ん. It doesn't change what you say — it frames it as background, a reason, or the very thing that needs explaining.
The short version
Take the plain form of a verb or adjective and add んです. Nothing about the fact changes — you're signalling "here's the situation / the reason / the point". Casual talk shrinks it to んだ or just の; formal writing spells it out as のです.
んです frames a "you see / that's why"
Attached to a plain statement, ん presents it as explanation — the backstory behind what you (or the other person) just saw or asked. It's how a plain report turns into "the thing is…".
なんです — after nouns & な-adjectives
After a noun or a な-adjective, you need な before the ん: 学生なんです ("(the thing is) I'm a student"), 好きなんです. The everyday agreement そう ("that's so") becomes そうなんです.
Watch out
Next: だろう・でしょう — probably / right? → · ね・よ・なあ → · All grammar