Johan Christian Tandberg Castberg was born in Fredrikstad as the son of priest and politician Peter Hersleb Harboe Castberg (1794-1858) and his wife Anne Margrethe Zimmer Henchel (1764-1830) [REF].
In 1858 he married Hanna Magdalena Frisak Ebbesen (1794-1858),[REF] daughter of Jørgen Tandberg Ebbesen and sister of Just Bing Ebbesen.