The length of time you can use humidifier filters without a replacement will depend on the type of filter as well as the type of humidifier you are using. Cool mist humidifiers generally use wick filters which may require replacements every two to three months. Steam humidifiers often do not use filters at all, although there may be special cartridges found inside of them used to catch minerals within the water. Humidifier filters may need to be changed more or less often depending on the mineral content of your water, whether the filters are treated to resist mold, and how often you use your humidifier.
Some humidifier filters are treated with microbiobial solution or wax to help prevent mold growth and bacteria accumulation. This may allow your filters to last longer than usual. Obviously, if you notice mold or discoloration on the filter, you should change it no matter how long it's been since you have done so. On average, filters should be changed every few months unless otherwise indicated on the filter packaging.
Many times humidifier filters are made to be cleaned and reused for the life of your humidifier. The length of time between cleanings will be similar to the replacement schedule of disposable filters, but you can generally use your own good sense when deciding when to clean the filter. If it appears dirty, discolored, or dingy, then you should give it a washing. If not, it is probably safe to wait a little longer before cleaning it.
These options are generally available for cold air humidifiers. Most steam humidifiers do not use filters at all, so changing them is not an issue. In some cases they will come with paper cartridges which are used to trap minerals found in water. A white dust-like substance will begin forming on these cartridges, and they usually need to be changed every few weeks. These are usually are much less expensive than conventional humidifier filters.
Many factors will impact how long it takes for your filter to become dirty. The dust level in your home as well as the mineral content of your water both will cause filters to become dirty more quickly. If you use your humidifier everyday, this will also lead to more frequent replacements or cleanings.