The process in which a relatively unspecialized cell acquires the specialized structural and/or functional features of an endocardial cell. An endocardial cell is a specialized endothelial cell that makes up the endocardium portion of the heart. The endocardium is the innermost layer of tissue of the heart, and lines the heart chambers.