Abstract 1,2-Dioxolanes and 1,2-dioxanes are 5- and 6-membered peroxidized heterocycles. They constitute relatively stable endoperoxide, which can be found over more than 400 isolated natural products. A major part of natural endoperoxides contains a 1,2-dioxane scaffold, and was isolated from marine species, notably sponges, but endoperoxides are also present in plant or in mushrooms for instance. Because these compounds exhibit potential cytotoxic, anti-malarial, antiviral, or antibiotic activities, the need to access these heterocycles is crutial to prepare rare natural product or new potent drugs. Over more than 20 years many methods emerged to synthesize 1,2-dioxolanes or 1,2-dioxanes (and 1,2-dioxenes). They are very dependant of the source of peroxide bond to build the heterocycles. The most studied method involves triplet oxygen using radical reactions, which enables direct construction of the heterocycles in one step, but might suffer from the non-selectivity of radical reactions. Hydrogen peroxide and/or hydroperoxides allow a better control of the diasteroselectivity but needs a two step sequence to form the endoperoxides. Singlet oxygen is a strong reagent which allows notably the formation of 1,2-dioxenes via a [4 + 2] cycloaddition, but the outcome of these reactions is sometimes difficult to control. To this end, generation of a peroxycarbenium species is a relatively new alternative method to generate a large variety of 1, 2-dioxolanes through a formal [3 + 2] cycloaddition. This reaction intermediate proved also to offer a reliable pathway to many functionalized 1,2-dioxanes or 1,2-dioxolanes.