Porphyrins are natural chemicals that are found in your body. They are an important part of many of your body’s functions. Usually, your body makes a small amount of porphyrins when it produces heme. Heme is an important component of hemoglobin, the protein in red blood cells that carries oxygen. Heme production involves a multistep process, and a different enzyme controls each step. If one of these enzymes is defective, this can cause porphyrins to build up in your body and potentially reach toxic levels. This causes the clinical disease porphyria. Porphyrin urine testing is used to help diagnose and sometimes to monitor porphyrias. One type of porphyrin urine testing is with a random, single urine sample, or they may ask you to complete a urine test over a 24-hour period. The production and elimination of porphyrins may vary throughout the day and between attacks, so a random sample may miss elevated porphyrin levels. A 24-hour urine test is painless and just requires a simple urine collection done in three stages.