Water in nature is rarely pure in the "distilled water" sense; it contains dissolved salts, buffers, nutrients, etc., with exact concentrations dependent on local conditions. Fish (and plants) have evolved over millions of years to the specific water conditions in their native habitats and may be unable to survive in, significantly different environments.
Beginners should take the easy approach of selecting fish, by matching their needs to qualities of your normal tap water. Alternatively, an advanced aquarist can change the water characteristics to match the fish's needs, though doing so is almost always more difficult than it first appears. In either case, you need to know enough about water chemistry to ensure that the water in your tank has the right properties for the fish you are keeping.
Water has four measurable properties that are commonly used to characterize its chemistry. They are pH, buffering capacity, general hardness and salinity. In addition, there are several nutrients and trace elements.
pH refers to water being either an acid or a base, or neutral. A pH of 7 is said to be neutral, a pH below 7 is "acidic" and a pH above 7 is a "base" or "alkaline". The pH scale is logarithmic. A pH of 5.5 is 10 times more acidic than water at a pH of 6.5. Thus, changing the pH by a small amount (suddenly) is more of a chemical change (and more stressful to fish) than it might first appear.
To you, two aspects of pH should be important. First, rapid changes in pH are stressful to fish and should be avoided. Changing the pH by more than 0.3 units per day is known to stress fish. Thus, you want the pH of your tank to remain constant and stable over the long period. Second, fish have adapted to thrive in a certain narrow pH range. You want to be sure that your tank's pH match the specific requirements of the fish you are keeping.
Most fish can adjust to a pH somewhat outside of their optimal range. If your water's pH is naturally within the range of 6.5 to 7.5, you will be able to keep most species of fish without any problems and there is probably no need to adjust the pH upward or downward.
Buffering Capacity (KH, Alkalinity)
Buffering capacity refers to water's ability to keep the pH stable as acids or bases are added. pH and buffering capacity are intertwined with one another; although one might think that adding equal volumes of an acid and neutral water would result in a pH halfway in between, this rarely happens in practice. If the water has sufficient buffering capacity, the buffering capacity can absorb and neutralize the added acid without significantly changing the pH. Conceptually, a buffer acts somewhat like a large sponge. As more acid is added, the "sponge" absorbs the acid without changing the pH much. The "sponge's" capacity is limited however; once the buffering capacity is used up, the pH changes more rapidly as acids are added.
Buffering has both positive and negative consequences. On the positive side, the nitrogen cycle produces nitric acid (nitrate). Without buffering, your tank's pH would drop over time, which is a bad thing. With sufficient buffering, the pH stays stable. On the negative side, hard tap water often almost always has a large buffering capacity. If the pH of the water is too high for your fish, the buffering capacity makes it difficult to lower the pH to a more appropriate value. Naive attempts to change the pH of water usually fail because buffering effects are ignored.
In freshwater aquariums, most of water's buffering capacity is due to carbonates and bicarbonates. Thus, the terms "Carbonate Hardness" (KH), "alkalinity" and "buffering capacity" are used interchangeably. Although technically these are not the same things, they are equivalent in practice in the context of fishkeeping. It is important to note that the term "alkalinity" should not be confused with the term "alkaline". Alkalinity refers to buffering, while alkaline refers to a solution that is a base (i.e. pH > 7).
Most aquarium buffering capacity test kits actually measure KH. The larger the KH, the more resistant to pH changes your water will be. A tank's KH should be high enough to prevent large pH changes in your tank over time. If your KH is below roughly 4.5 dH, you should pay special attention to your tank's pH (e.g. test weekly, until you get a feel for how stable the pH is). This is especially important if you neglect to do frequent partial water changes. In particular, the nitrogen cycle creates a tendency for an established tank's pH to decrease over time. The exact amount of pH change depends on the quantity and rate of nitrates produced, as well as the KH. If your pH drops more than roughly 0.2 over a month, you should consider increasing the KH or performing partial water changes more frequently. KH doesn't affect fish directly, so there is no need to match fish species to a particular KH.
It is important to note that it is not a good idea to use distilled water in your tank. By definition, distilled water has essentially no KH. That means that adding even a little bit of acid will change the pH significantly (stressing fish). Because of its instability, distilled (or any essentially pure water) is never used directly. Tap water or other salts must first be added to it in order to increase its GH and KH.
General Hardness (GH)
General Hardness (GH) refers to the dissolved concentration of magnesium and calcium ions. When fish are said to prefer "soft" or "hard" water, it is GH (not KH) that is being referred to.
It is important to note that GH, KH and pH are the basics of water chemistry. Although the three properties are distinct, they all interact with each other to varying degrees, making it difficult to adjust one without impacting the other. That is one reason why beginning aquarists are advised not to tamper with these parameters unless absolutely necessary. As an example, "hard water" frequently often comes from limestone aquifers. Limestone contains calcium carbonate, which when dissolved in water increases both the GH (from calcium) and KH (from carbonate) components. Increasing the KH component also usually increases pH as well.
Water hardness follows the following guidelines. The unit dH means "degree hardness", while ppm means "parts per million", which is roughly equivalent to mg/L in water. 1 unit dH equals 17.8 ppm Calcium Carbonate (CaCO3). Most test kits give the hardness in units of CaCO3; this means the hardness is equivalent to that much CaCO3 in water but does not mean it actually came from CaCO3.
Salinity refers to the total amount of dissolved substances. Salinity measurements count both GH and KH components as well as such other substances as sodium. Knowing water's salinity becomes important in salt-water aquariums. In freshwater tanks, knowing pH, GH and KH suffices.
Salinity is usually expressed in terms of its specific gravity, the ratio of a solution's weight to weight of an equal volume of distilled water. Because water expands when heated (changing its density), a common reference temperature of 59F degrees is used. Salinity is measured with a hydrometer, which is calibrated for use at a specific temperature (e.g., 75F degrees is common).
One component of salinity that neither GH or KH includes is sodium. Some freshwater fish tolerate (or even prefer) a small amount of salt (it stimulates slime coat growth). Moreover, parasites (e.g., ick) do not tolerate salt at all. Thus, salt in concentrations of (up to) 1 tablespoon per 5 gallons can actually help prevent and cure ick and other parasitic infections.
On the other hand, some species of fish do not tolerate ANY salt well. Scaleless fish (in general) and some Corydoras catfish are far more sensitive to salt than most freshwater fish. Add salt only if you are certain that all of your tank's inhabitants prefer it or can at least tolerate it.
Nutrients and Trace Elements
In addition to GH, KH, pH and salinity, there are a few other substances you may want to know about. Most tap water contains an assortment of nutrients and trace elements in very low concentrations. The presence (or absence) of trace elements can be important in some situations, specifically:
The following measurements are approximate; use a test kit to verify you've achieved the intended results. Note that if your water is extremely soft to begin with (1 degree KH or less), you may get a drastic change in pH as the buffer is added.
To raise both GH and KH simultaneously, add calcium carbonate (CaCO3). 1/2 teaspoon per 100 liters of water will increase both the KH and GH by about 1-2 dH. Alternatively, add some sea shells, coral, limestone, marble chips, etc. to your filter.
To raise the KH without raising the GH, add sodium bicarbonate (NaHCO3), commonly known as baking soda. 1/2 teaspoon per 100 Liters raises the KH by about 1 dH. Sodium bicarbonate drives the pH towards an equilibrium value of 8.2.
One can raise or lower pH by adding chemicals. Because of buffering, however, the process is difficult to get right. Increasing or decreasing the pH (in a stable way) actually involves changing the KH. The most common approach is to add a buffer (in the previous section) whose equilibrium holds the pH at the desired value.
Muriatic (hydrochloric) acid can be used to reduce pH. Note that the exact quantity needed depends on the water's buffering capacity. In effect, you add enough acid to use up all the buffering capacity. Once this has been done, decreasing the pH is easy. However, it should be noted that the resultant lower-pH water has much less KH buffering than it did before, making it more susceptible to pH swings when (for instance) nitrate levels rise. Warning: It goes without saying that acids are VERY dangerous! Do not use this approach unless you know what you are doing, and you should treat the water BEFORE adding it to the aquarium.
Products such as "pH-Down'' are often based on a phosphoric acid buffer. Phosphoric acid tends to keep the pH at roughly 6.5, depending on how much you use. Unfortunately, use of phosphoric acid has the BIG side effect of raising the phosphate level in your tank, stimulating algae growth. It is difficult to control algae growth in a tank with elevated phosphate levels. The only advantage over hydrochloric acid is that pH will be somewhat better buffered at its lower value.
One safe way to lower pH WITHOUT adjusting KH is to bubble CO2 (carbon dioxide) through the tank. The CO2 dissolves in water, and some of it forms carbonic acid. The formation of acid lowers the pH. Of course, in order for this approach to be practical, a steady source of CO2 bubbles (e.g. a CO2 tank) is needed to hold the pH in place. As soon as the CO2 is gone, the pH bounces back to its previous value. The high cost of a CO2 injection system precludes its use as a pH lowering technique in most aquariums (though see the PLANT FAQ for inexpensive do-it-yourself alternatives). CO2 injection systems are highly popular in heavily-planted tanks, because the additional CO2 stimulates plant growth.
Some fish (e.g., discus, cardinal tetras, etc.) prefer soft water. Although they can survive in harder water, they are unlikely to breed in it. Thus, you may feel compelled to soften your water despite the hassle involved in doing so.
Typical home water softeners soften water using a technique known as "ion exchange''. That is, they remove calcium and magnesium ions by replacing them with sodium ions. Although this does technically make water softer, most fish won't notice the difference. That is, fish that prefer soft water don't like sodium either, and for them such water softeners don't help at all. Thus, home water softeners are not an appropriate way to soften water for aquarium use.
Fish stores also market "water softening pillows''. They use the same ion-exchange principle. One "recharges'' the pillow by soaking it in a salt water solution, then places it in the tank where the sodium ions are released into the water and replaced by calcium and magnesium ions. After a few hours or days, the pillow (along with the calcium and magnesium) are removed, and the pillow recharged. The pillows sold in stores are too small to work well in practice, and shouldn't be used for the same reason cited above.
Peat moss softens water and reduces its hardness (GH). The most effective way to soften water via peat is to aerate water for 1-2 weeks in a bucket containing peat moss. For example, get a (plastic) bucket of the appropriate size. Then, get a large quantity of peat (a gallon or more), boil it (so that it sinks), stuff it in a pillow case, and place it in the water bucket. Use an air pump to aerate it. In 1-2 weeks, the water will be softer and more acidic. Use this aged water when making partial water changes on your tank.
Peat can be bought at pet shops, but it is expensive. It is much more cost-effective to buy it in bulk at a local gardening shop. Read labels carefully! You don't want to use peat containing fertilizers or other additives.
Although some folks place peat in the filters of their tanks, the technique has a number of drawbacks. First, peat clogs easily, so adding peat isn't always effective. Second, peat can be messy and may cloud the water in your tank. Third, the exact quantity of peat needed to effectively soften your water is difficult to estimate. Using the wrong amount results in the wrong water chemistry. Finally, when doing water changes, your tank's chemistry changes when new water is added (it has the wrong properties). Over the next few days, the chemistry changes as the peat takes effect. Using aged water helps ensure that the chemistry of your tank doesn't fluctuate while doing water changes.
Hard water can also be softened by diluting it with distilled water or R/O water.
R/O (reverse-osmosis) water is purified water made by a R/O unit. Unfortunately, R/O units are too expensive ($100 - $500) for most hobbyists. R/O water can also be purchased at some fish stores, but for most folks the expense and hassle are not worth it. The same applies to distilled water.