There are several ways to test for hard water.
Sending a water sample to an independent laboratory will provide the most accurate results, but this is typically the most expensive option.
A “soapsuds test” can give you a rough estimate of your water hardness. Fill a clean glass or plastic bottle with tap water, then add 10 drops of pure dishwashing liquid and shake well for at least 10 seconds. If the solution creates a lot of suds and the water below the suds is clear, your water is likely on the soft side. If the solution doesn’t foam well and the water below the suds is cloudy, you likely have hard water.
Some DIY test kits test for water hardness. A wet-strip test works similar to tests for swimming pool or spa water.