Jupiter's atmosphere contains mainly helium and hydrogen with trace amounts of water, ammonia, methane, and other carbon compounds. Three layers of clouds may exist in Jupiter’s outermost atmosphere. The lowest are made of water ice or droplets, the next are crystals of a compound of ammonia and hydrogen sulfide, and the highest clouds are ammonia ice. There seems to be no solid surface under the atmosphere, only a transition from gas to liquid metallic hydrogen. In the top one-fourth of the planet, the pressure and temperature are so high that the hydrogen atoms are stripped of their outer electrons, forming a liquid metal.
i think this is enough to explain the carbon,helium,hydrogen atmospheric similarities of earth and Jupiter,Good day!