Barnes & Noble Inc shares soared 21 percent on Wednesday after the struggling bookseller said it was up for sale and could get a bid from its founder to go private.

Barnes & Noble, the No. 1 U.S. book store chain, said on Tuesday that company founder and top shareholder Leonard Riggio is considering bidding for the company as part of a larger investor group.

An auction of Barnes & Noble could draw interest from several prominent investors, such as billionaire Ron Burkle, and could raise speculation about a combination with smaller rival Borders Group Inc . Borders shares jumped 5.3 percent on Wednesday.

Going private could also help the company realign its business as readers transition to digital book formats. Barnes & Noble's sales and profits have been hit as it contends with competition in the fast-growing electronic books market from Inc and Apple Inc .

Goldman Sachs upgraded Barnes & Noble shares to neutral from sell and raised its price target on the shares to $15. The stock was trading at $15.53 early on Wednesday but was still well below a year high of $28.76, hit last August.

Goldman analyst Matthew Fassler warned in a research note that he remains guarded, given sizable investments associated with the transition to digital books, and risks to store profitability.

Credit Suisse analyst Gary Balter warned in his own note that it could be difficult for Barnes & Noble to find a buyer.

As long is it's primarily a brick & mortar retailer, and that business remains pressured, we believe it will be difficult to get any credit, Balter wrote.

The pressure on Barnes & Noble to revamp its strategy became clearer in June, when it reported a larger loss as it spent money to develop its Nook electronic reader, which competes against Amazon's Kindle and Apple's iPad.

Sales at Barnes & Noble namesake stores open at least a year fell 3.1 percent during its most recent quarter and the company gave a tepid sales outlook for this year.

(Reporting by Phil Wahba; Editing by Michele Gershberg; editing by John Wallace)