The Red Hot Chili Peppers, The Black Keys and Black Sabbath will headline this year's Lollapalooza festival.

The trio will be joined at the three-day Chicago music event by a diverse range of acts which also includes Florence and the Machine, Jack White, Sigur Ros and Bloc Party.

Jane's Addiction frontman Perry Farrell - who founded the annual event - thinks he has created the perfect line-up after a lot of anxiety over the acts.

He said: ''Every year it's kind of a nail biter putting a line-up together. There were moments when I looked at it and I was beside myself. I didn't know what to do.

''But that line-up is just going to be so exciting and it's so diverse. I think it works so well.''

Perry was particularly anxious about signing Black Sabbath for the event - which takes place in Grant Park from August 3 - because there was so much competition to get the original line-up of the group to play, only for them to be hit with health problems that left their shows in doubt.

Perry admitted to Rolling Stone magazine: ''Every festival in the world wanted Black Sabbath to perform, but at the time of the announcement they had to back off and cancel all their shows.

''It broke my heart, but I just kind of kept a little fire building, a little kindling going to see if possibly we could get Black Sabbath. I didn't have much faith.''

Other acts confirmed to appear at the festival include Justice, Franz Ferdinand, former 'American Idol' contestant Haley Reinhart and The Afghan Whigs.

Read more: http://www.rollingstone.com/music/news/lollapalooza-2012-lineup-black-sabbath-chili-peppers-jack-white-20120411#ixzz1rigb2oKs

The festival in Chicago's sprawling Grant Park begins Aug. 3.

The schedule of more than 120 bands features Lollapalooza's signature mix of mainstream headliners and indie bands. The global factor is strong with acts from across Europe, Chile, Australia and Malaysia. It also reflects American music hubs like Austin, Nashville and Portland, spanning genres from rock to pop, hip hop and rap to electronic dance.

Bloc Party, Franz Ferdinand, The Afghan Whigs, The Shins and former ''American Idol'' contestant Haley Reinhart are on the bill. The full lineup is available on Lollapalooza's website.

In recent years headliners have included Lady GaGa, Green Day, Eminem and Coldplay.

Putting together the perfect lineup has a special set of challenges, Farrell said.

''You are trying to balance a lot of things,'' he said. ''Balance economics, there's budget how much we can afford for talent. You're trying to balance that with who's available.''