Porosity in carbonate rocks results from many processes, both depositional and postdepositional. An understanding of these processes and of the textural history of porosity is necessary to a full appreciation of the history of the rock and is important in the location of potential hydrocarbon reservoir rocks. Several mechanisms appear particularly important in producing or changing porosity and pore-size distribution in carbonate rocks. Primary interparticle porosity is formed by deposition of a well-sorted calcareous sand or gravel under the influence of strong currents or waves or by local production of calcareous sand-size particles with sufficient rapidity to deposit particle on particle with little or no interstitial mud. Dissolution of interstitial mud in a calcareous sand can produce a microvuggy porosity resembling interparticle pore space. Simple cementation by calcite, anhydrite, dolomite, or quartz destroys porosity and pore size. Calcite cement appears to be especially common where the particles are monocrystalline, such as crinoid fragments. Primary constructional vugs are produced by formation of a rigid or semirigid framework. This framework may be organic or inorganic, and the inter-framework pockets may be filled with sediment or later with cement. Sucrose dolomite contains the most common North American carbonate pore type. Available petrographic evidence indicates that it is formed by growth of randomly oriented, uniformly sized dolomite euhedra, accompanied by or followed by dissolution of the nonreplaced calcite. The interpretation of time and mechanism of dissolution depends on whether a local or a distant source of carbonate is assumed. Available evidence suggests that local source of carbonate and thus the development of porosity through dolomitization may be quite common. The intercrystalline pore geometry is produced by dissolution of the nonreplaced calcite. Thus only those limestones that have been converted to nearly pure dolomite by replacement and loss of nonreplaced calcite appear to be potential dolomite reservoir rocks. This porosity may be destroyed by calcite or by optically continuous dolomite cement. Limestone deposited originally as lime muds with abundant floating sand-size particles appears to be commonly preferred by the replacing dolomite euhedra. The patchy growth of either scattered dolomite euhedra or masses of interlocking dolomite anhedra, followed or accompanied by dissolution of the non-replaced limestone relict patches, produces vugs. A similar textural history of replacement by one mineral and dissolution of the nonreplaced patches is found in limestone replaced by fine networks of chert. Dissolution of the nonreplaced limestone produces porosity. Dolomitization of a limestone with inter-particle or vuggy porosity without cementation of the earlier void space permits preservation of that void space. Replacement by a mineral more susceptible to solution alteration, such as anhydrite, followed by dissolution of the replacement anhydrite appears to be a common vug-making mechanism. Vugs are also produced by simple dissolution of the more soluble particles or parts of particles, by fracturing, and by dissolution along fractures.