WASHINGTON—The Trump administration is sounding out the medical industry on requiring hospitals, doctors and other health-care providers to publicly disclose the secretly negotiated prices they charge insurance companies for services, a move that would expose for the first time the actual cost of care.

Mandating public disclosure of the rates would upend a longstanding industry practice and put more decision-making power in the hands of patients. Hospitals and insurers typically treat specific prices for medical services as closely held secrets, with contracts between the insurers and hospital systems generally bound by confidentiality agreements.

The U.S. Department of Health and Human Services is seeking public comment on whether patients have a right to see the discounted prices in advance of obtaining care, federal officials said. The invitation for comment—outlined in a little noticed passage of a broader patient-data proposal released last month—is a major step toward a possible rule that could require providers to release such information, they said.

Commercial health-care markets are rife with complex systems of hidden charges and secret discounts. Policy makers, employers and patients are often unable to see clearly which hospital systems and doctor practices are driving high costs.

The administration’s vision—which would possibly include fines for noncompliance—is to arm patients with information needed to make health-care decisions much like shopping for other consumer services. Rates potentially could be posted on public websites, where consumers would check the negotiated price of a service before they pick a provider. That, in turn, could lead to lower copays or deductibles.