Strange and exotic weapons are a recurring feature or theme in science fiction. In some cases, weapons first introduced in science fiction have now been made a reality. Other science fiction weapons remain purely fictional, and are often beyond the realms of known physical possibility.
At its most prosaic, science fiction features an endless variety of sidearms, mostly variations on real weapons such as guns and swords. Among the best-known of these are the phaser used in the Star Trek television series, films and novels and the lightsaber or laser gun featured in the Star Wars movies, comics, novels and TV series.
In addition to adding action and entertainment value, weaponry in science fiction sometimes become themes when they touch on deeper concerns, often motivated by contemporary issues. One example is science fiction that deals with weapons of mass destruction.
Weapons of early science fiction novels were usually bigger and better versions of conventional weapons, effectively more advanced methods of delivering explosives to a target. Examples of such weapons include Jules Verne's fulgurator and the "glass arrow" of the Comte de Villiers de l'Isle-Adam.
A classic science fiction weapon particularly in British and American science fiction novels and films is the ray gun. A very early example of a ray gun is the Heat-Ray featured in H. G. Wells' The War of the Worlds (1898). The discovery of x-rays and radioactivity in the last years of the 19th century led to an increase in the popularity of this family of weapons, with numerous examples in the early twentieth century, such as the disintegrator rays of George Griffith's future war novel The Lord of Labour (1911). Early science fiction film often showed raygun beams making bright light and loud noise like lightning or large electric arcs. Nikola Tesla's attempts at developing directed-energy weapons, or "death rays", also fueled the imagination of many writers, with death rays featuring in novels like Pierrepont Noyes' The Pallid Giant (1927).
After the invention of the laser in 1960, it briefly became the death ray of choice for science fiction writers. For instance, characters in the Star Trek pilot episode The Cage (1964) and in the Lost in Space TV series (1965–1968) carried handheld laser weapons.
By the late 1960s and 1970s, as the laser's limits as a weapon became evident, the ray gun began to be replaced by similar weapons with names that better reflected the destructive capabilities of the device. These names ranged from the generic "pulse rifle" to series-specific weapons, such as the phasers from Star Trek.
In the Warhammer 40,000 franchise, a faction known as the Imperial Guard has a "lasgun" as their main weapon, and larger cannon versions being mounted onto tanks and being carried around by Space Marines. The Eldar has a special unit called the Swooping Hawks equipped with a "lasblaster".
Weapons using plasma (high-energy ionized gas) have been featured in a number of fictional universes, such as Transformers, the Halo franchise, Star Wars, Babylon 5 and the Sci-Fi miniature game Warhammer 40,000.
Nuclear weapons are a staple element in science fiction novels. The phrase "atomic bomb" predates their existence, and dates back to H. G. Wells' The World Set Free (1914) when scientists had discovered that radioactive decay implied potentially limitless energy locked inside of atomic particles (Wells' atomic bombs were only as powerful as conventional explosives, but would continue exploding for days on end). Cleve Cartmill predicted a chain-reaction-type nuclear bomb in his 1944 science-fiction story "Deadline", which led to the FBI investigating him, due to concern over a potential breach of security on the Manhattan Project.
The use of radiological, biological and chemical weapons is another common theme in science fiction. In the aftermath of World War I, the use of chemical weapons, particularly poison gas, was a major worry, and was often employed in the science fiction of this period, for example Neil Bell's The Gas War of 1940 (1931). Robert A. Heinlein's 1940 story "Solution Unsatisfactory" posits radioactive dust as a weapon that the US develops in a crash program to end World War II; the dust's existence forces drastic changes in the postwar world. In The Dalek Invasion of Earth, set in the 22nd Century, it is claimed the Daleks invaded Earth after it was bombarded with meteorites and a plague wiped out entire continents.
A subgenre of science fiction, post-apocalyptic fiction, uses the aftermath of nuclear or biological warfare as its setting.
The idea of powered armor has appeared in a wide variety of fiction, beginning with E. E. Smith's Lensman series in 1937. One of the most famous early versions was Robert A. Heinlein's 1959 novel Starship Troopers, which can be seen as spawning the entire subgenre concept of military "powered armor", which would be further developed in Joe Haldeman's The Forever War. The Marvel character Iron Man is another noteworthy example. Other examples include the power armor used by the Space Marines and other characters from Games Workshop's Warhammer 40k franchise, and the power armor used by the Brotherhood of Steel in the Fallout franchise, and the MJOLNIR Armor worn by protagonist Master Chief in the Halo series of video games. The anime series Gundam Wing centers around nuclear powered piloted suits of armor called mobile suits, The Mobile suits referred to as Gundams (Being made from the highly durable material, Gundanium) are virtually indestructible, highly maneuverable and boasting formidable firepower.
Powered armor suits appear numerous times in the later Command and Conquer games.
Some science fiction stories contain accounts of hand-to-hand combat in zero gravity, and the idea that old-fashioned edged weapons—daggers, saws, mechanical cutters—may still have the advantage in close-up situations where projectile weapons are impractical.
The idea of cyberwarfare, in which wars are fought within the structures of communication systems and computers using software and information as weapons, was first explored by science fiction.
John Brunner's 1975 novel The Shockwave Rider is notable for coining the word "worm" to describe a computer program that propagates itself through a computer network, used as a weapon in the novel. William Gibson's Neuromancer coined the phrase cyberspace, a virtual battleground in which battles are fought using software weapons and counterweapons. The Star Trek episode A Taste of Armageddon is another notable example.
Certain Dale Brown novels place cyberweapons in different roles. The first is the "netrusion" technology used by the U.S. Air Force. It sends corrupt data to oncoming missiles to shut them down, as well as hostile aircraft by giving them a "shutdown" order in which the systems turn off one by one. It is also used to send false messages to hostiles, in order to place the tide of battle in the favor of America. The technology is later reverse-engineered by the Russian Federation to shut down American anti-ballistic missile satellites from a tracking station at Socotra Island, Yemen.
Cyberwarfare has moved from a theoretical idea to something that is now seriously considered as a threat by modern states.
In a similar but unrelated series of incidents involved various groups of hackers from India and Pakistan that hacked and defaced several websites of companies and government organizations based in each other's country. The actions were committed by various groups based in both countries, but not known to be affiliated with the governments of India or Pakistan. The cyber wars are believed to have begun in 2008 following the Mumbai attacks believed to be by a group of Indian cyber groups hacking into Pakistani websites. Hours after the cyber attacks, a number of Indian websites (both government and private) were attacked by groups of Pakistani hackers, claiming to be retaliation for Indian attacks on Pakistani websites. The back and forth attacks have persisted on occasions since then.
In Fred Saberhagen's 1967 Berserker stories, the Berserkers of the title are giant computerized self-replicating spacecraft, once used as a doomsday device in an interstellar war aeons ago, and, having destroyed both their enemies and their makers, still attempting to fulfil their mission of destroying all life in the universe. The 1967 Star Trek episode "The Doomsday Machine" written by Norman Spinrad, explores a similar theme.
Alien doomsday machines are common in science fiction as "Big Dumb Objects", McGuffins around which the plot can be constructed. An example is the Halo megastructures in the video game franchise Halo, which are world-sized doomsday machines.
The science fiction themes of autonomous weapons systems and the use of computers in warfare date back to the 1960s, often in a Frankensteinian context, notably in Harlan Ellison's 1967 short story "I Have No Mouth, and I Must Scream" and films such as The Forbin Project, originally released in 1970. In Keith Laumer's Bolo novels, the eponymous protagonists are huge main battle tanks with self-aware artificial intelligence.
Another common theme is that of dehumanised, cyborg or android soldiers: human, or quasi-human beings who are themselves weapons. Philip K. Dick's 1953 short story "Second Variety" features self-replicating robot weapons, this time with the added theme of weapons imitating humans. In his short story "Impostor", Dick goes one step further, making its protagonist a manlike robot bomb that actually believes itself to be a human being.
The idea of robot killing machines disguised as humans is central to James Cameron's film The Terminator, and its subsequent media franchise. They also appear as the central problem of the 1995 cult film Screamers and its sequel. The Battlestar Galactica's cylons are sentient weapons too, even in the original series and in its reboot in the 2000s. However, human-looking cylons are the central characters of the remake series (in the original series, only one prototype was human-looking).
In Harlan Ellison's 1957 short story "Soldier From Tomorrow" the protagonist is a soldier who has been conditioned from birth by the State solely to fight and kill the enemy. Samuel R. Delany's 1966 novella Babel-17 features TW-55, a purpose-grown cloned assassin. Ridley Scott's 1982 film Blade Runner, like Philip K. Dick's novel Do Androids Dream of Electric Sheep?, on which it is loosely based, uses the story of a hunt for escaped military androids to explore the idea what it means to be human.
In John Carpenter's 1974 film Dark Star, a notable portion of the plot involves the characters trying to convince a large intelligent bomb to not detonate inside the ship.
Themes of brainwashing, conditioning, memory-erasing, and other mind control methods as weapons of war feature in much science fiction of the late 1950s and 1960s, parallelling the contemporary panic about communist brainwashing, existence of sleeper agents, and the real-world attempts of governments in programs such as MK-ULTRA to make such things real.
David Langford's short story BLIT (1988) posits the existence of images (called basilisks) that are destructive to the human brain, which are used as weapons of terror by posting copies of them in areas where they are likely to be seen by the intended victims. Langford revisited the idea in a fictional FAQ on the images, published by the science journal Nature in 1999. The neuralyzer from the Men in Black films are compact objects which can erase and modify the short-term memories of witnesses by the means of a brief flash of light, ensuring that no one remembers encountering either aliens or the agents themselves.
The TV series Dollhouse (2009) features technology that can "mindwipe" people (transforming them into "actives", or "dolls") and replace their inherent personalities with another one, either "real" (from another actual person's mind), fabricated (for example, a soldier trained in many styles of combat and weaponry, or unable to feel pain), or a mixture of both. In a future timeline of the series, the technology has been devised into a mass weapon, able to "remote wipe" anyone and replace them with any personality. A war erupts between those controlling actives, and "actuals" (a term to describe those still retaining their original personas). An offshoot technology allows actual people to upload upgrades to their personas (such as fighting or language skills), similar to the process seen in The Matrix, albeit for only one skill at a time.
Some weapons in science fiction can be folded and put away for easy storage. For instance the sword carried by Hikaru Sulu in the Star Trek movie of 2009 had its blade unfold from its own form into the fully extended position from the state of a simple handle. Another example of this are the weapons of the Mass Effect universe. The weaponry in the games would fold up into smaller and more compact shapes when holstered or deactivated. Lightsabers from Star Wars are no larger than a flashlight until they are turned on.
Some new forms of real world weaponry resemble weapons previously envisaged in science fiction. The early 1980s-era Strategic Defense Initiative, a proposed missile defense system intended to protect the United States from attack by ballistic strategic nuclear weapons (Intercontinental ballistic missiles and Submarine-launched ballistic missiles), gained the popular name "Star Wars" after the popular franchise created by George Lucas.
In some cases, the influence of science fiction on weapons programs has been specifically acknowledged. In 2007, the science fiction author Thomas Easton was invited to address engineers working on a DARPA program to create weaponized cyborg insects, as envisaged in his novel Sparrowhawk. 
Active research on powered exoskeletons for military use has a long history, beginning with the abortive 1960s Hardiman powered exoskeleton project at General Electric, and continuing into the 21st century. The borrowing between fiction and reality has worked both ways, with the power loader from the film Aliens resembling the prototypes of the Hardiman system. As of 2008, practical powered exoskeleton prototypes have been constructed and tested outside of the laboratory.
American military research on high power laser weapons started in the 1960s, and has continued to the present day, with the U.S. Army planning, as of 2008, the deployment of practical battlefield laser weapons. Lower-powered lasers are currently used for military purposes as laser target designators and for military rangefinding. Laser weapons intended to blind combatants have also been developed, but are currently banned by the Protocol on Blinding Laser Weapons, although low-power versions designed to dazzle rather than blind have been developed experimentally. Gun-mounted lasers have also been used as psychological weapons, to let opponents know that they have been targeted in order encourage them to hide or flee without having to actually open fire on them.