A geoporphyrin, also known as a petroporphyrin, is a porphyrin of geologic origin. They can occur in crude oil, oil shale, coal, or sedimentary rocks. Abelsonite is possibly the only geoporphyrin mineral, as it is rare for porphyrins to occur in isolation and form crystals.
The field of organic geochemistry had its origins in the isolation of porphyrins from petroleum. This finding helped establish the biological origins of petroleum. Petroleum is sometimes "fingerprinted" by analysis of trace amounts of nickel and vanadyl porphyrins.