To be + Pronoun (subject form)
Incorrect : It was him.
Correct : It was he.
Note: The pronoun after a ‘to be’ verb must be in the subject form, and not in the object form. In informal conversational English we often say. “It’s me". But this sentence is grammatically wrong and hence unacceptable in formal written composition.