Avalanche photodiodes (APDs) based on 4H-SiC are excellent candidates to replace PMTs in the UV, particularly for harsh environment applications. Here, we report on dark current analysis of 4H-SiC APDs with separate absorption and multiplication regions. Detailed analysis of the leakage current as a function of device size showed that for a given device design, the bulk leakage component is dominant at U>600V, while surface leakage is dominant at U<600V. Electron beam induced current was also used to establish a correlation between leakage current and major types of defects in the substrate. There were two types of dislocations that could be easily distinguished in the images, including threading (spots) and basal plane (comet-like) dislocations. Using image processing software, densities of threading dislocations as well as basal plane dislocations were obtained and correlated with leakage currents of the corresponding APDs. The results suggest a strong effect of threading dislocations on dark current. Densities of basal plane dislocations were very similar in all devices tested suggesting that a role of basal plane dislocations was not dominant in leakage current of the APDs.