Darren Tinklin, 24, from Blackwood, Caerphilly county, had admitted two charges of making explosives and possessing a firearm.
Tinklin had not wanted to injure and had not meant to create any risk, Newport Crown Court heard.
He had kept right-wing paraphernalia, including items with Nazi SS symbols.
He also had a t-shirt which said “100% fascist”.
Cardiff Recorder Nicholas Cooke said he must send a “stern message to those who flirt with the manufacture of devices of this kind”.
He said: “Ideas and political affiliations may come and go but there is a potential threat presented by someone who harbours an interest in explosives and extremist views.
“I cannot completely ignore that.”
The court heard that Tinklin gave up his right-wing political interests in 2005, and although he had downloaded a bomb-making manual, he had never opened the files.
Mr Cooke referred to Tinklin’s drug problem, saying it could lead to irresponsibility which coupled with an interest in explosives was a cause for concern.
He added there was the risk of explosive materials falling into the wrong hands.
However he gave him credit for his guilty plea but warned that people involved with explosives would face stern custodial sentences.
Tinklin was sentenced to three years, less the 119 days he has spent on remand.