When used for cleaning, soap allows insoluble particles to become soluble in water, so they can then be rinsed away. For example: oil/fat is insoluble in water, but when a couple of drops of dish soap are added to the mixture, the oil/fat solubilizes into the water. The insoluble oil/fat molecules become associated inside micelles, tiny spheres formed from soap molecules with polar hydrophilic (water-attracting) groups on the outside and encasing a lipophilic (fat-attracting) pocket, which shields the oil/fat molecules from the water making it soluble. Anything that is soluble will be washed away with the water.
The type of alkali metal used determines the kind of soap product. Sodium soaps, prepared from sodium hydroxide, are firm, whereas potassium soaps, derived from potassium hydroxide, are softer or often liquid. Historically, potassium hydroxide was extracted from the ashes of bracken or other plants. Lithium soaps also tend to be hard—these are used exclusively in greases.
Soaps are derivatives of fatty acids. Traditionally they have been made from triglycerides (oils and fats). Triglyceride is the chemical name for the triesters of fatty acids and glycerin. Tallow, i.e., rendered beef fat, is the most available triglyceride from animals. Its saponified product is called sodium tallowate. Typical vegetable oils used in soap making are Palm oil, Coconut oil, olive oil, and Laurel oil. Each species offers quite different fatty acid content and hence, results in soaps of distinct feel. The seed oils give softer but milder soaps. Soap made from pure olive oil is sometimes called Castile soap or Marseille soap, and is reputed for being extra mild. The term "Castile" is also sometimes applied to soaps from a mixture of oils, but a high percentage of olive oil.
The earliest recorded evidence of the production of soap-like materials dates back to around 2800 BC in ancient Babylon. A formula for soap consisting of water, alkali, and cassia oil was written on a Babylonian clay tablet around 2200 BC.
The Ebers papyrus (Egypt, 1550 BC) indicates the ancient Egyptians bathed regularly and combined animal and vegetable oils with alkaline salts to create a soap-like substance. Egyptian documents mention a soap-like substance was used in the preparation of wool for weaving.
In the reign of Nabonidus (556–539 BC), a recipe for soap consisted of uhulu [ashes], cypress [oil] and sesame [seed oil] "for washing the stones for the servant girls".
The word sapo, Latin for soap, first appears in Pliny the Elder's Historia Naturalis, which discusses the manufacture of soap from tallow and ashes, but the only use he mentions for it is as a pomade for hair; he mentions rather disapprovingly that the men of the Gauls and Germans were more likely to use it than their female counterparts. Aretaeus of Cappadocia, writing in the first century AD, observes among "Celts, which are men called Gauls, those alkaline substances that are made into balls [...] called soap". The Romans' preferred method of cleaning the body was to massage oil into the skin and then scrape away both the oil and any dirt with a strigil. The Gauls used soap made from animal fat.
A popular belief claims soap takes its name from a supposed Mount Sapo, where animal sacrifices were supposed to have taken place; tallow from these sacrifices would then have mixed with ashes from fires associated with these sacrifices and with water to produce soap, but there is no evidence of a Mount Sapo in the Roman world and no evidence for the apocryphal story. The Latin word sapo simply means "soap"; it was likely borrowed from an early Germanic language and is cognate with Latin sebum, "tallow", which appears in Pliny the Elder's account. Roman animal sacrifices usually burned only the bones and inedible entrails of the sacrificed animals; edible meat and fat from the sacrifices were taken by the humans rather than the gods.
Zosimos of Panopolis, circa 300 AD, describes soap and soapmaking. Galen describes soap-making using lye and prescribes washing to carry away impurities from the body and clothes. The use of soap for personal cleanliness became increasingly common in the 2nd century A.D. According to Galen, the best soaps were Germanic, and soaps from Gaul were second best. This is a reference to true soap in antiquity.
A detergent similar to soap was manufactured in ancient China from the seeds of Gleditsia sinensis. Another traditional detergent is a mixture of pig pancreas and plant ash called "Zhu yi zi". True soap, made of animal fat, did not appear in China until the modern era. Soap-like detergents were not as popular as ointments and creams.
A 12th-century Islamic document describes the process of soap production. It mentions the key ingredient, alkali, which later becomes crucial to modern chemistry, derived from al-qaly or "ashes".
By the 13th century, the manufacture of soap in the Islamic world had become virtually industrialized, with sources in Nablus, Fes, Damascus, and Aleppo.
Soapmakers in Naples were members of a guild in the late sixth century (then under the control of the Eastern Roman Empire), and in the eighth century, soap-making was well known in Italy and Spain. The Carolingian capitulary De Villis, dating to around 800, representing the royal will of Charlemagne, mentions soap as being one of the products the stewards of royal estates are to tally. The lands of Medieval Spain were a leading soapmaker by 800, and soapmaking began in the Kingdom of England about 1200. Soapmaking is mentioned both as "women's work" and as the produce of "good workmen" alongside other necessities, such as the produce of carpenters, blacksmiths, and bakers.
In France, by the second half of the 15th century, the semi-industrialized professional manufacture of soap was concentrated in a few centers of Provence—Toulon, Hyères, and Marseille—which supplied the rest of France. In Marseilles, by 1525, production was concentrated in at least two factories, and soap production at Marseille tended to eclipse the other Provençal centers. English manufacture tended to concentrate in London.
Finer soaps were later produced in Europe from the 16th century, using vegetable oils (such as olive oil) as opposed to animal fats. Many of these soaps are still produced, both industrially and by small-scale artisans. Castile soap is a popular example of the vegetable-only soaps derived from the oldest "white soap" of Italy.
In modern times, the use of soap has become commonplace in industrialized nations due to a better understanding of the role of hygiene in reducing the population size of pathogenic microorganisms. Industrially manufactured bar soaps first became available in the late 18th century, as advertising campaigns in Europe and America promoted popular awareness of the relationship between cleanliness and health.
Until the Industrial Revolution, soapmaking was conducted on a small scale and the product was rough. In 1780 James Keir established a chemical works at Tipton, for the manufacture of alkali from the sulfates of potash and soda, to which he afterwards added a soap manufactory. The method of extraction proceeded on a discovery of Keir's. Andrew Pears started making a high-quality, transparent soap in 1807 in London. His son-in-law, Thomas J. Barratt, opened a factory in Isleworth in 1862.
During the reign of Queen Anne (February 1665 – August 1714) a soap tax was introduced in England which meant that, until the mid eighteen hundreds, soap was a luxury, only used regularly by the well-to-do. The soap manufacturing process was closely supervised by revenue officials who made sure that soap makers equipment was kept under lock and key when not being supervised. Moreover, soap could not be produced by small makers because of a law which stipulated that soap-boilers must manufacture a minimum quantity of one imperial ton at each boiling, which placed the process beyond reach of the average person. The soap trade was boosted and deregulated when the tax was repealed in 1853.
William Gossage produced low-priced, good-quality soap from the 1850s. Robert Spear Hudson began manufacturing a soap powder in 1837, initially by grinding the soap with a mortar and pestle. American manufacturer Benjamin T. Babbitt introduced marketing innovations that included sale of bar soap and distribution of product samples. William Hesketh Lever and his brother, James, bought a small soap works in Warrington in 1886 and founded what is still one of the largest soap businesses, formerly called Lever Brothers and now called Unilever. These soap businesses were among the first to employ large-scale advertising campaigns.
Liquid soap was not invented until the nineteenth century; in 1865, William Shepphard patented a liquid version of soap. In 1898, B.J. Johnson developed a soap (made of palm and olive oils); his company (the B.J. Johnson Soap Company) introduced "Palmolive" brand soap that same year. This new brand of the new kind of soap became popular rapidly, and to such a degree that B.J. Johnson Soap Company changed its name to Palmolive.
In the early 1900s, other companies began to develop their own liquid soaps. Such products as Pine-Sol and Tide appeared on the market, making the process of cleaning things other than skin (e.g., clothing, floors, bathrooms) much easier.
Liquid soap also works better for more traditional/non-machine washing methods, such as using a washboard.
The industrial production of soap involves continuous processes, such as continuous addition of fat and removal of product. Smaller-scale production involves the traditional batch processes. The three variations are: the 'cold process', wherein the reaction takes place substantially at room temperature, the 'semi-boiled' or 'hot process', wherein the reaction takes place near the boiling point, and the 'fully boiled process', wherein the reactants are boiled at least once and the glycerol is recovered. There are several types of 'semi-boiled' hot process methods, the most common being DBHP (Double Boiler Hot Process) and CPHP (Crock Pot Hot Process). Most soapmakers, however, continue to prefer the cold process method. The cold process and hot process (semi-boiled) are the simplest and typically used by small artisans and hobbyists producing handmade decorative soaps. The glycerine remains in the soap and the reaction continues for many days after the soap is poured into molds. The glycerine is left during the hot-process method, but at the high temperature employed, the reaction is practically completed in the kettle, before the soap is poured into molds. This simple and quick process is employed in small factories all over the world.
Handmade soap from the cold process also differs from industrially made soap in that an excess of fat is used, beyond that needed to consume the alkali (in a cold-pour process, this excess fat is called "superfatting"), and the glycerine left in acts as a moisturizing agent. However, the glycerine also makes the soap softer and less resistant to becoming "mushy" if left wet. Since it is better to add too much oil and have left-over fat, than to add too much lye and have left-over lye, soap produced from the hot process also contains left-over glycerine and its concomitant pros and cons. Further addition of glycerine and processing of this soap produces glycerin soap. Superfatted soap is more skin-friendly than one without extra fat. However, if too much fat is added, it can leave a "greasy" feel to the skin. Sometimes, an emollient additive, such as jojoba oil or shea butter, is added "at trace" (i.e., the point at which the saponification process is sufficiently advanced that the soap has begun to thicken in the cold process method) in the belief that nearly all the lye will be spent and it will escape saponification and remain intact. In the case of hot-process soap, an emollient may be added after the initial oils have saponified so they remain unreacted in the finished soap. Superfatting can also be accomplished through a process known as "lye discount" in which the soap maker uses less alkali than required instead of adding extra fats.
Even in the cold soap making process, some heat is usually required; the temperature is usually raised to a point sufficient to ensure complete melting of the fat being used. The batch may also be kept warm for some time after mixing to ensure the alkali (hydroxide) is completely used up. This soap is safe to use after about 12–48 hours, but is not at its peak quality for use for several weeks.
Cold-process soapmaking requires exact measurements of lye and fat amounts and computing their ratio, using saponification charts to ensure the finished product does not contain any excess hydroxide or too much free unreacted fat. Saponification charts should also be used in hot processes, but are not necessary for the "fully boiled hot-process" soaping.
Historically, lye used in the cold process was made from scratch using rainwater and ashes. Soapmakers deemed the lye solution ready for use when an egg would float in it. Homemade lye making for this process was unpredictable and therefore eventually led to the discovery of sodium hydroxide by English chemist Sir Humphry Davy in the early 1800s.
A cold-process soapmaker first looks up the saponification value for each unique fat on an oil specification sheet. Oil specification sheets contain laboratory test results for each fat, including the precise saponification value of the fat. The saponification value for a specific fat will vary by season and by specimen species. This value is used to calculate the exact amount of sodium hydroxide to react with the fat to form soap. The saponification value must be converted into an equivalent sodium hydroxide value for use in cold process soapmaking. Excess unreacted lye in the soap will result in a very high pH and can burn or irritate skin; not enough lye leaves the soap greasy. Most soap makers formulate their recipes with a 2–5% deficit of lye, to account for the unknown deviation of saponification value between their oil batch and laboratory averages.
The lye is dissolved in water. Then, the oils are heated, or melted if they are solid at room temperature. Once the oils are liquefied and the lye is fully dissolved in water, they are combined. This lye-fat mixture is mixed until the two phases (oils and water) are fully emulsified. Emulsification is most easily identified visually when the soap exhibits some level of "trace", which is the thickening of the mixture. Many modern-day amateur soapmakers often use a stick blender to speed up this process. There are varying levels of trace. Depending on how additives will affect trace, they may be added at light trace, medium trace, or heavy trace. After much stirring, the mixture turns to the consistency of a thin pudding. "Trace" corresponds roughly to viscosity. Essential oils and fragrance oils can be added with the initial soaping oils, but solid additives such as botanicals, herbs, oatmeal, or other additives are most commonly added at light trace, just as the mixture starts to thicken.
The batch is then poured into molds, kept warm with towels or blankets, and left to continue saponification for 12 to 48 hours. (Milk soaps or other soaps with sugars added are the exception. They typically do not require insulation, as the presence of sugar increases the speed of the reaction and thus the production of heat.) During this time, it is normal for the soap to go through a "gel phase", wherein the opaque soap will turn somewhat transparent for several hours, before once again turning opaque.
After the insulation period, the soap is firm enough to be removed from the mold and cut into bars. At this time, it is safe to use the soap, since saponification is in essence complete. However, cold-process soaps are typically cured and hardened on a drying rack for 2–6 weeks before use. During this cure period, trace amounts of residual lye are consumed by saponification and excess water evaporates.
During the curing process, some molecules in the outer layer of the solid soap react with the carbon dioxide of the air and produce a dusty sheet of sodium carbonate. This reaction is more intense if the mass is exposed to wind or low temperatures.
Hot-processed soaps are created by encouraging the saponification reaction by adding heat to speed up the reaction. In contrast with cold-pour soap which is poured into molds and for the most part only then saponifies, hot-process soaping for the most part saponifies the oils completely and only then is poured into molds.
In the hot process, the hydroxide and the fat are heated and mixed together at 80–100 °C, a little below boiling point, until saponification is complete, which, before modern scientific equipment, the soapmaker determined by taste (the sharp, distinctive taste of the hydroxide disappears after it is saponified) or by eye; the experienced eye can tell when gel stage and full saponification has occurred. Beginners can find this information through research and classes. Tasting soap for readiness is not recommended, as sodium and potassium hydroxides, when not saponified, are highly caustic.
An advantage of the fully boiled hot process in soapmaking is the exact amount of hydroxide required need not be known with great accuracy. They originated when the purity of the alkali hydroxides were unreliable, as these processes can use even naturally found alkalis, such as wood ashes and potash deposits. In the fully boiled process, the mix is actually boiled (100+ °C), and, after saponification has occurred, the "neat soap" is precipitated from the solution by adding common salt, and the excess liquid is drained off. This excess liquid carries away with it much of the impurities and color compounds in the fat, to leave a purer, whiter soap, and with practically all the glycerine removed. The hot, soft soap is then pumped into a mold. The spent hydroxide solution is processed for recovery of glycerine.
Many commercially available soap molds are made of silicone or various types of plastic, although many soapmaking hobbyists may use cardboard boxes lined with a plastic film. Wooden molds, unlined or lined with silicone sleeves, are also readily available to the general public. Soaps can be made in long bars that are cut into individual portions, or cast into individual molds.
In the fully boiled process on an industrial scale, the soap is further purified to remove any excess sodium hydroxide, glycerol, and other impurities, color compounds, etc. These components are removed by boiling the crude soap curds in water and then precipitating the soap with salt.
At this stage, the soap still contains too much water, which has to be removed. This was traditionally done on chill rolls, which produced the soap flakes commonly used in the 1940s and 1950s. This process was superseded by spray dryers and then by vacuum dryers.
The dry soap (about 6–12% moisture) is then compacted into small pellets or noodles. These pellets or noodles are then ready for soap finishing, the process of converting raw soap pellets into a saleable product, usually bars.
Soap pellets are combined with fragrances and other materials and blended to homogeneity in an amalgamator (mixer). The mass is then discharged from the mixer into a refiner, which, by means of an auger, forces the soap through a fine wire screen. From the refiner, the soap passes over a roller mill (French milling or hard milling) in a manner similar to calendering paper or plastic or to making chocolate liquor. The soap is then passed through one or more additional refiners to further plasticize the soap mass. Immediately before extrusion, the mass is passed through a vacuum chamber to remove any trapped air. It is then extruded into a long log or blank, cut to convenient lengths, passed through a metal detector, and then stamped into shape in refrigerated tools. The pressed bars are packaged in many ways.
Sand or pumice may be added to produce a scouring soap. The scouring agents serve to remove dead cells from the skin surface being cleaned. This process is called exfoliation. Many newer materials that are effective, yet do not have the sharp edges and poor particle size distribution of pumice, are used for exfoliating soaps.
To make antibacterial soap, compounds such as triclosan or triclocarban can be added. There is some concern that use of antibacterial soaps and other products might encourage antibiotic resistance in microorganisms.