Amniotic fluid (liquor amnii) is the clear or slightly yellowish liquid surrounding the fetus in the uterus.  The amniotic sac of a pregnant woman contains the amniotic fluid which plays a vital role in the proper development of the baby. 
It mainly contains water, fetal wastes (mainly urine) and fetal skin cells. 
The fluid is produced by the mother’s placenta during the first trimester and the early part of the second trimester, until the baby’s kidneys are mature enough to take over the task.  The baby swallows the fluid as they “breathe” and then excretes it again as urine, thus maintaining the constant circulation of the fluid. However, the urine making up the fluid is not pure waste material as the majority of the fetal waste is passed through the placenta to be filtered by the mother’s kidneys.
It fulfils various purposes apart from protecting the baby inside the womb by forming a cushion around it.
Its volume continues to increase until the 34th to 36th week of pregnancy  when the amniotic sac contains around one quart fluid on average. The fluid volume then gradually goes down until the time of delivery.  Having too much or too little amniotic fluid during pregnancy may lead to various health conditions and complications related to childbirth.
The amniotic sac breaks during or before (rare cases) labor draining the fluid through the vagina. This is commonly referred to as the waters breaking.
Amniotic fluid deficiency during pregnancy can lead to a Oligohydramnios, which increases the chances of complications like premature birth and various birth defects (like hypoplastic lungs) in the newborn as well as miscarriage and stillbirth. There are generally no symptoms of low fluid levels apart from the belly being smaller than it should at a certain gestational age. Risk factors include gestational diabetes, hypertension, high blood pressure and preeclampsia. The treatment mainly involves fetal monitoring using regular ultrasounds. 
Excessive amniotic fluid level in the uterus is known as polyhydramnios which can lead to symptoms like difficulty breathing, excessive weight gain and edema. Various factors may be responsible for elevated fluid levels, such as maternal diabetes and infectious conditions as well as fetal abnormalities. The extra amniotic fluid may leak through the vagina in some rare cases. Complications associated with polyhydramnios are similar to oligohydramnios as they include preterm labor, premature rupture of membranes, stillbirth and various congenital problems (cleft palate, Down’s syndrome). Treatment or monitoring often includes weekly ultrasounds and karyotyping. 
Amniotic fluid index or AFI helps to estimate the amniotic fluid levels in the uterus for determining the fetal well-being. It is included in the biophysical profile of the fetus.
The AFI (usually expressed in cm) is determined by performing ultrasound (ultrasonography) examination of the uterus. Certain procedures are used by doctors for determining the AFI with the “single deepest pocket” and the four-quadrant technique being most commonly used. The latter technique involves measuring the deepest vertical length of the fluid pockets separately in each quadrant to calculate the total fluid volume.
The AFI is given below (in centimeters) by gestational age in a normal pregnancy :
Apart from the above two complications, amniotic fluid abnormalities can lead to the following conditions as well:
A rare condition in which the amniotic fluid as well as some fetal materials such as hair, fetal cells and other debris enters the mother’s bloodstream through the placental bed, triggering allergic reactions. The principal symptoms are shortness of breath, sudden decrease in blood pressure, seizures, nausea, pulmonary edema and cardiovascular collapse. It can lead to life threatening complications such as severe neurological damage and even brain death. 
A group of birth defects generally occurring when certain body parts of the growing fetus gets caught in thin strings or bands within the womb. It occurs when the inside membrane of the placenta ruptures while the outer one remains intact, causing the stringy pieces to float around in the fluid. Sometimes, these pieces can entangle around the growing baby, cutting off the blood circulation in certain body parts (commonly the fingers and toes). Associated birth defects include short or absent finger or toe, cleft lip, cleft palate and club foot. Surgery in the utero to disentangle the strings is the most common and effective treatment option. 
Also known as amnionitis, it is a bacterial infection of the amniotic fluid before or during labor. E. coli, anaerobic bacteria and group B streptococci are some of the most common causes of the infection. Associated complications include heavy blood loss during and after delivery, c-section delivery and bacteremia (bacteria in the blood of the mother and the baby). 
Sometimes, the baby passes their first feces (meconium) shortly before delivery which then mixes with the amniotic fluid. Meconium aspiration syndrome, occurring when the baby inhales this mixture into the lungs, can lead to various congenital conditions (chronic lung disease, hearing loss, limpness at birth)  and even death of the infant. 
Amniotic fluid analysis involves collecting a fluid sample from the mother’s abdomen (amniocentesis)  to assess the genetic health of the developing baby. The fetal cells in the fluid help to determine the risk of any genetic defects. Amniocentesis test is also useful for gender determination.
Vaginal pH tests can also help to detect various fetal abnormalities. The amniotic fluid pH level ideally ranges between 7.0 and 7.5 while the upper vaginal pH remains between 3.8 and 4.5. So, a pH test strip showing pH levels above 4.5 may indicate ruptured membranes. Other tests used for detecting fetal abnormalities and fluid leakage include fern test and nitrazine paper test. Regular fundal height measurement can also help to ensure proper fetal growth and detect any change in the fluid levels.
Amniotic fluid leakage through the vagina can indicate certain serious complications during any pregnancy stage. A constant feeling of wetness due to continuous vaginal discharge is the main sign of leaking amniotic fluid. However, sometimes it might be quite difficult to determine whether the dampness is occurring due to fluid leakage or is simply caused by excessive sweating or urine leakage (mainly during the third trimester). The following points may help to detect a fluid leakage:
Certain medical procedures are used for temporarily increasing the amniotic fluid levels for managing the conditions associated with low fluid amounts.
Experts have recently proved that considerable amounts of stem cells are present in the amniotic fluid. These pluripotent cells are capable of differentiating into various tissues (skin, cartilage bones, muscles), a property that may prove useful for medical applications in the future.