The highly-rated 18-year-old has impressed for the Reds since making her debut at the age of 16, appearing in all but one of Scott Rogers' side's matches in the 2017 FA WSL Spring Series.
Charles was also nominated for the 2016 NWFA's Women's Rising Star prize, having scored two goals for England U17s in their third-place play-off with Norway to help the Lionesses qualify for the U17 Women's World Cup last year with a 2-1 victory.
On her new Liverpool deal, Charles said: “I am delighted to have agreed a new contract with the club. We showed earlier this year in the Spring Series that we can compete with the top teams and I am confident that we can challenge for trophies over the next few seasons.
“The manager has shown great faith in the younger players, giving the likes of myself and Ali [Johnson] opportunities in the FA WSL Spring Series, which highlights how serious the club is in bringing players through their youth setup.”
Rogers added: “We are absolutely thrilled that Niamh has agreed a new contract with Liverpool Ladies. Since progressing through the youth setup, Niamh has been absolutely brilliant, making the step up to senior level look effortless.
“She is a player with huge potential who I have no doubt will be a key player for club and country in years to come. Niamh has also proven over the FA WSL Spring Series that she can be a versatile player, which highlights her outstanding footballing intelligence at such a young age.”