Javert can be played any number of ways that work, but of course which way you choose is going to depend on how other people in your cast choose to play their roles and what you are comfortable with and works for you.
Javert can be a cold, implacable force of nature, or he can be a fiery, angry man who keeps those emotions tapped down because he knows they aren't appropriate, or anything in-between. Or he can just be a bully, but I have never much cared for that interpretation.
I'd suggest reading the Javert portions of the novel, if you haven't already.
'"Contrairiwise," continued Tweedledee, "if it was so, it might be; and if it were so, it would be; but as it isn't, it ain't. That's logic."'
~Lewis Carroll