The defendants, all men in their 20s from the former Yugoslavia and the Middle East, include a pizza deliveryman suspected of using his job to scout out the military base.
Their goal was "to kill as many American soldiers as possible" with mortars, rocket-propelled grenades and guns, prosecutors said.
"Today we dodged a bullet. In fact, when you look at the type of weapons that this group was trying to purchase, we may have dodged a lot of bullets," said FBI agent J.P. Weis.
"We had a group that was forming a platoon to take on an army. They identified their target, they did their reconnaissance. They had maps. And they were in the process of buying weapons. Luckily, we were able to stop that."
Authorities said there was no direct evidence connecting the men to any international terror organizations such as al-Qaida. But several of them said they were ready to kill and die "in the name of Allah," according to court papers.
Investigators said they infiltrated the group with two informants well over a year ago and bided their time while they secretly recorded the defendants, four of whom lived in Cherry Hill, a Philadelphia suburb about 20 miles from Fort Dix.
"This is what law enforcement is supposed to do in the post-9/11 era - stay one step ahead of those who are attempting to cause harm to innocent American citizens," U.S. Attorney Christopher Christie said.
Weis saluted the unidentified New Jersey store clerk who noticed the suspicious video as the "unsung hero" of the case. "That's why we're here today - because of the courage and heroism of that individual," the FBI agent said.
In addition to plotting the attack on Fort Dix, the defendants spoke of assaulting a Navy installation in Philadelphia during the annual Army-Navy football game and conducted surveillance at other military installations in the region, prosecutors said.
One defendant, Eljvir Duka, was recorded as saying: "In the end, when it comes to defending your religion, when someone ... attacks your religion, your way of life, then you go jihad."
The six were arrested Monday night trying to buy AK-47 assault weapons, M-16s and other weapons from an FBI informant, authorities said.
They appeared in court Tuesday in Camden and were ordered held without bail for a hearing Friday. Five were charged with conspiracy to kill U.S. military personnel; the sixth was charged with aiding and abetting illegal immigrants in obtaining weapons.
Four of the men were born in the former Yugoslavia, one was born in Jordan and one came from Turkey, authorities said. All had lived in the United States for years. Three were in the United States illegally; two had green cards allowing them to stay in this country permanently; and the sixth is a U.S. citizen.
One defendant, Mohamad Ibrahim Shnewer, spoke of killing least 100 soldiers, according to court documents.
"My intent is to hit a heavy concentration of soldiers," he was quoted as saying. "You hit four, five or six Humvees and light the whole place (up) and retreat without any losses."