In formal writing, contracted or abbreviated words such as can't, couldn't or it's should only be used in dialogue or directly reported speech, for example if you quote someone's work. At all other times use the full word(s) such as can not, could not or it is.