|Plot element from the Star Trek franchise|
|First appearance||Star Trek: The Next Generation|
|Created by||Gene Roddenberry|
|Function||Synthesis of organic and inorganic materials via rearrangement of subatomic particles|
In Star Trek a replicator is a machine that can create (and recycle) things. Replicators were originally seen to simply synthesize meals on demand, but in later series much larger non-food items appear. The technical aspects of replicated versus "real" things is sometimes a plot element.
Although previous sci-fi writers had speculated about the development of "replicating" or "duplicating" technology, the term "replicator" was not itself used until Star Trek: The Next Generation. In simple terms, it was described as a 24th century advancement from the 23rd century "food synthesizer" seen in Star Trek: The Original Series. In Star Trek: The Original Series, food was created in various colored cubes. In the animated series (1974), various types of realistic-looking food could be requested, as in the episode entitled "The Practical Joker." The mechanics of these devices were never clearly explained on that show. The subsequent prequel series, Star Trek: Enterprise, set in the 22nd century, featured a "protein resequencer" that could only replicate certain foods, so an actual chef served on board who used a hydroponic greenhouse where fruits and vegetables were grown. Additionally, that ship had a "bio-matter resequencer" which was used to recycle waste product into usable material.
According to an academic thesis: "The so-called 'replicators' can reconstitute matter and produce everything that is needed out of pure energy, no matter whether food, medicaments, or spare parts are required." A replicator can create any inanimate matter, as long as the desired molecular structure is on file, but it cannot create antimatter, dilithium, latinum, and (in the case of at least federation replicators) living things of any kind; for the last case, non-canon works such as the Star Trek: the Next Generation Technical Manual state that, though the replicators share the same technology with transporters, the resolution used is too low to create living tissue. However, other replicators, such as the ones used by the aliens in the TNG episode "Allegiance," could create living things, including the brain's many trillions of dendritic connections where memory is stored.
One of the most important pieces of technology in the Star Trek universe, the replicator is used primarily to provide food and water on board starships, thus eliminating the need to stock most provisions (though starships, starbases, and other installations still stock some provisions for emergencies, such as in cases of replicator failure or an energy crisis.) On Star Trek: Deep Space Nine, it was established that as long as there is an energy source to power life support, replication is used to provide breathable air on ships and starbases (and to disassemble the carbon dioxide exhaled by the crew), thus providing a seemingly endless supply of oxygen and eliminating the need to carry air tanks.
The technology is also used for producing spare parts, which makes it possible to repair most ship damage without having to return to a starbase. Other applications include replication of Starfleet uniforms, as well as everyday objects such as toys and souvenirs. Replication is also used by the Holodeck program to allow food, clothes, and other objects belonging within a simulation to be used or consumed by the participants.
Starfleet's safety protocols prevent unauthorized replication of dangerous objects, such as weapons and poisonous substances.
Replicators can also convert matter into energy. Following that principle, the device can dismantle any object into subatomic particles. The ensuing energy can then be stored for future use or immediately applied in a subsequent replication. This process is referred to as "recycling", and is applied to everything from dirty dishes to outgrown children's clothes.
Replicator technology, even if produced on a larger scale, had not been able to be used to create complex objects such as shuttlecraft or starships (the production staff felt that being able to replicate entire starships "at the push of a button" would severely impact dramatic potential). However, in the Star Trek: Deep Space Nine episode "For the Cause", industrial replicators are used to replicate large components of ships, shuttlecraft, and other pieces of this sort, which are later used in shipyards to construct such vessels. In this manner, as few as 15 industrial replicators are enough to replicate the components needed to build a fleet of starships or to help a civilization recover from a planet-wide natural disaster.
This ability to reproduce complex machines is furthered during the first season of "Star Trek: Prodigy". A replicator is shown to have the capacity to replicate an entire starship in the second episode, "Lost & Found", when Gwyn is attempting to escape the Protostar. When she reaches the shuttle bay, she finds a replicator with the technology to manufacture a complete ship. The process by which it is replicated takes minutes rather than seconds though, and behaves more similarly to a 3D printer than a traditional replicator. 
By virtually eliminating material scarcity, replicator technology plays an important role in the moneyless human economy within the Star Trek universe.
When the USS Voyager was pulled to the Delta Quadrant, it became clear that replicator technology was unknown to some of the indigenous peoples of that region. Throughout the first seasons, the Kazon and other races tried repeatedly to obtain the technology.
In the Voyager episode "State of Flux", how the Kazon aliens obtain the technology from the USS Voyager, is a major plot point in the episode.
Captain Janeway feared that if this technology were acquired by a civilization before they were ready, disastrous consequences could ensue. For this reason, and because of the Prime Directive, Janeway refused to give away the technology at any price.
Also on Voyager, the ship's energy constraints on the journey back to the Alpha Quadrant meant that replicator supplies had to be strictly controlled, leading to "replicator rations" becoming an unofficial ship currency. This is also the reason Neelix (aside from providing the crew with a morale boost through the preparation of fresh food) became employed as the ship's chef. Some ingredients came from the ship's hydroponics laboratory.
In 2014, researchers at Nestlé were reported as working on technology comparable to the replicator, with the goal of providing food tailored to an individual's nutritional requirements.
Imperial College London physicists have discovered how to create matter from light - a feat thought impossible when the idea was first theorised 80 years ago. In just one day in Imperial's Blackett Physics Laboratory, three physicists worked out a relatively simple way to physically prove a theory first devised by scientists Breit and Wheeler in 1934.
BeeHex, an Ohio startup company, received a grant in 2013 from NASA intended for developing long-spaceflight food 3D printing technology. They now build food printing robots for eventual public use.
Cemvita Factory Inc., a biotech startup based in Houston, TX, is also developing a photobioreactor that converts carbon dioxide that's captured from air along with hydrogen from hydrolyzing water to nutrients and pharmaceutics.
A 2016 article in The New Yorker noted that replicators may be a "metaphor for the distant endpoint of the Industrial Revolution". They point out that technology as presented in Star Trek: The Next Generation changes the moral equation of being human, because nearly anything you want can be created with a request.
They note that Captain Picard's favorite beverage, Earl Grey tea, is created by the replicator, and the character often states "Tea, Earl Grey, Hot" during the television show. The beverage is then seen being produced in the replicator with a special visual and sound effect.
((cite journal)): Cite journal requires