The process in which a precursor cell type acquires the specialized features of a dendritic cell. A dendritic cell is a leukocyte of dendritic lineage specialized in the uptake, processing, and transport of antigens to lymph nodes for the purpose of stimulating an immune response via T cell activation.