Defect and electrical characterization of bulk semi-insulating (SI) 4H-SiC crystals and SI and n-type 4H-SiC epitaxial layers grown by chemical vapor deposition (CVD) on highly doped (0001) 4H-SiC substrates is reported. Optical microscopy, electron beam induced current (EBIC) imaging, current-voltage (I-V) measurements, thermally stimulated current (TSC) spectroscopy (94 K-620 K), Hall effect, and van der Pauw measurements have been conducted for characterization and defect correlation studies. Both epitaxial layers exhibited relatively shallow levels related to Al, B, L- and D-centers. Deep level centers in the n-type epitaxial layer peaked at similar to 400 K (E-a similar to 1.1 eV), and similar to 470 K were correlated with IL2 defect and 1.1 eV center in high-purity bulk SI 4H-SiC. The SI epitaxial layer exhibited peak at similar to 290 K (E-a = 0.82-0.87 eV) that was attributed to IL1 and HK2 centers, and at similar to 525 K that was related to intrinsic defects and their complexes with energy levels close to the middle of the band-gap. Results of EBIC and optical microscopy showed segregation of threading dislocations around comet tail defects in the n-type epitaxial layer. The I-V characteristics of the devices on SI epitaxial layer exhibited steps corresponding to the ultimate trap filling of deep centers. The high-temperature resistivity measurements of bulk SI 4H-SiC sample revealed resistivity hysteresis that was attributed to the filling of the deep-level electron trap centers. The responsivity of the n-type epitaxial 4H-SiC detector in the soft X-ray energy range is reported for the first time.