ANALYSIS: Hillary Clinton could still become the next US president despite an FBI investigation into her leaked emails which may result in jail time.

Clinton is the subject of a drawn-out FBI investigation that could result in criminal charges over her use of a private email account as Secretary of State.

But an indictment or even a conviction would not prevent her from being elected to the presidency if she has the votes.

There is no law prohibiting a felon or even a prisoner from becoming president. Eugene Debs was doing time in federal jail when he ran for president in 1920, garnering 3.4 percent of the vote for the Socialist Party.

Most states prohibit prisoners and ex-felons from voting, but nothing stops them running for office themselves.

If Hillary Clinton is indicted and faces trial over her unsecure email system, she could resist calls to drop out of the race and keep on running. And given Donald Trump's unpopularity with independent voters, she would have a shot at winning.

And if as president she is found guilty of mishandling classified information, she would be able to pardon herself. As complicated and unwieldy as the US Constitution is, there is no caveat that prevents a president using their pardoning powers on themselves, unless in cases of impeachment. Curiously, this issue last arose in 1998 when Bill Clinton was in trouble for the Lewinsky scandal.

Clinton’s decision to set up a private email server in her home in 2009 has been a millstone around her neck during her campaign to become the first female president.

The FBI has revealed many emails on her account contained information that should have been classified and not transmitted to an insecure account. And that's where this becomes a potential criminal case.

So what happens if the presumptive Democratic nominee gets indicted by the Department of Justice? It really comes down to when.

Clinton is yet to clinch the necessary number of delegates to become the Democratic party's nominee, but in a week's time, that will change. Right now she is 71 delegates short of the magic number, and there's 908 still up for grabs. So if Clinton is indicted tomorrow, she would still probably have enough support in the upcoming California and New Jersey primaries to get over the line.

So what happens if Clinton drops out after the primaries but before the convention? The bad news for Bernie Sanders is that the second-place getter doesn't automatically take that position.

Instead, the delegates Clinton has received in the primary process become unbound and are free to support whoever they choose. And just because Sanders is the only other candidate currently in the race, doesn't mean they'll pick him.

The likelier option is that Vice President Joe Biden steps up. Biden is more popular among Democrats than Clinton is, and has the resume and the name recognition to be a formidable general election candidate.

But what happens if Clinton drops out after securing the nomination? It's impossible to say because it's never actually happened before. The most likely option is that the Democratic National Committee (DNC) will select someone to replace her on the ballot. Given that Sanders has not made many friends with the Democratic party establishment, it would probably be Biden.

However, Clinton has never been the sort of person to back down from a fight. She has already weathered countless investigations, most of which have not shown any conclusive wrongdoing.

Hillary Clinton at an event in Oakland, California. (AAP)

Vice President Joe Biden. (AAP)

Bernie Sanders speaks at a rally. (AAP)