Grammar · N4
〜んです / 〜のです: explanation and background
Frame a statement as the explanation or background relevant to the current situation.
In short
Verb and い-adjective plain forms take んです; nouns and な-adjectives use なんです. Casual speech commonly uses んだ or の.
How it works
頭が痛いです simply states a fact. 頭が痛いんです presents the headache as the relevant explanation for what is happening.
Useful contrast
This is not a universal “more polite” ending. Its core job is to connect the statement to an implied question, reason, discovery or shared context.
Examples
どうしたんですか。
What is wrong?
明日は行けないんです。
The thing is, I cannot go tomorrow.
Common pitfall
With nouns and な-adjectives, use なんです rather than *だんです.