By Julie Watts

(KPIX 5) – California is trying to help patients avoid big medical bills. A new tool lets patients crunch the numbers before going under the knife.

Jeremy Weintraub expected he’d have a scar from his hernia surgery. What the young dad didn’t expect was a bill for $20,000 for a surgery that would have only cost him a few hundred if he’s chosen a different hospital.

READ MORE: 3 Teens Accused Of Killing Man, Stealing His Dog & Car In San Francisco On New Year's Eve

“It seemed like a weird sort of game I didn’t know the rules for,” Weintraub said.

Now, the state Insurance Commissioner is attempting to level the playing field.

“Californians until this moment have really struggled to get price information,” said Insurance Commissioner Dave Jones.

The Department of Insurance, along with Consumer Reports and UCSF, unveiled their new health care compare tool, called California Healthcare Compare.

It allows consumer to compare pricing and quality hospital to hospital.

“You’re going to be asked increasingly to pay more out of your pocket before your insurance kicks in, so you need to know what these things cost,” Jones said.

READ MORE: San Francisco Police Preparing to Handle Niner Fan Festivities on Sunday

Jones points to growing out-of-pocket maximums and hidden out of network costs that can leave even the insured paying thousands for a procedure that might have cost them just hundreds at a hospital a couple miles away.

The website allows patients to pick a procedure, compare hospital ratings and determine the high, low and median price for that procedure in their region. But it stops short of giving you the specific cost at each hospital.

“What we’d ideally like to have is real-time information about each medical provider in your area,” Jones told KPIX 5 ConsumerWatch. “But that information unfortunately is held by the health insurers, and so far they’ve been unwilling to share it. This is a step in that direction.”

So until there’s a law requiring them to share pricing info, healthcare compare links you to your insurer’s website for the specifics, where you can use what you learned on the state’s site to gauge what you should be paying.

The hope is the tool will motivate folks like Weintraub to compare hospitals before procedures, potentially saving them thousands, and prompting providers to keep costs down.

“Ultimately it’s the patients’ responsibility to fend for themselves basically,” Weintraub said

This site is intended for planned surgeries, such as hip replacement and child birth and features 100 of the most common procedures.

MORE NEWS: IRS Website Will Soon Require Facial Recognition To Log Into Your Account

California Healthcare Compare was paid for by an Affordable Care Act grant.