Aside from an outright blockage in the waste line, an overflowing tank is one of the more serious problems that can develop with a toilet. It wastes water, which can be a critical issue if you live in a drought-stricken community, and if the tank overflows when you aren't home, you could return to a flooded bathroom. The problem is easy to fix -- either the fill valve or overflow tube need servicing.
A Running Toilet
The overflow tube is part of the flush valve -- it's the white plastic tube that you see in the middle of the tank when you remove the lid. When the float is adjusted properly, the toilet fill valve shuts off when the water level is an inch below the top of this tube. When the float isn't adjusted properly, the level keeps rising until water begins draining into the overflow tube and goes into the bowl. It's easy to tell this happening without looking, because the fill valve never shuts off, and the toilet keeps running.
Toilet Tank Overflows
The overflow tube, a safety device, prevents the tank from spilling water onto the floor when something goes wrong with the fill valve, but it may not work for two reasons. The first is that the overflow tube is too tall -- this can happen when you install a new flush valve and fail to properly size the overflow tube. The second reason water may spill out of the tank is that the float is seriously out of adjustment. Both conditions require immediate attention to prevent damage to the floor, subfloor and worse.
Cut the Overflow Tube
Fill valve manufacturers purposely make overflow tubes tall so that they will work in newer low-flow toilets with tall tanks. When installing a new fill valve in an older tank, you need to cut the tube to the proper length with a hacksaw. The top of the tube should rise no higher than an inch below the flush lever, because the lever isn't sealed, and water can flow past it. You don't have to remove the tube to cut it -- you should be able to fit a small hacksaw inside the tank.
Adjust the Float and Fill Valve
If the height of the overflow tube is correct and water is draining into it, adjust the float to lower the water level. Cup-style floats have an adjustment rod that you can lengthen to push down the float -- the water level goes down with it. If your toilet has an older ballcock-style ball float, unscrew the ball to lengthen the armature and put more pressure on the fill valve; this makes it close sooner. You may also have to adjust the valve, which you do by turning the adjustment screw on top with a screwdriver. Turn the screw clockwise to close the aperture and make the valve shut off sooner.