Biography
The shadow warriors of feudal Japan, reputedly possessed of all manner of mysterious powers known as ninjutsu, including invisibility and intangibility. Able to infiltrate even the most heavily guarded fortress without being detected. If they are caught, they may trick their pursuers by mysteriously swapping places with a log. They may be portrayed as cutting down any opposition with superhuman swiftness. Traditionally dressed in black bodysuits with black masks or veils to hide their faces (or sometimes in white). They are the ultimate spies and assassins, gifted with their own deadly magic and martial arts. Born in hidden villages, they are trained from birth to obey nindo, an alternative Code of Honor to bushido; to show no pain, feel no emotion, and remain loyal to their clans under pain of death — or the third code of getting as much money as possible.
Or so popular legend has it. While ninjas did indeed exist, their reputation for invisibility and infiltration more likely stemmed from their willingness to dress as members of a lower social class when no one in the nobility of Japan would consider doing such a thing. Their "invisibility" was part psychological in cause — by dressing as a peasant, they were ignored and dismissed, or never even noticed at all, by the upper classes, a useful thing despite the oft fierce travel restrictions on the lower classes. Superior knowledge of survival skills, a lot of actual stealth, poisons, assassination techniques and unorthodox tactics (added to the fact that the ninjas actively encouraged the spread of rumors of their magical abilities) were the most important though. A popular myth states that ninjas came from lower classes (at least compared to the samurai) and they were often hired to do the dirty deeds honorable samurai would not do, but in reality ninjas were usually samurai, or in rare cases, mercenaries hired by samurai. Ninjas were mainly deployed for espionage, sabotage, and sometimes assassination. More recent research indicates that ninja as even well-learnt historians thought of them may not have existed at all. All of the most famous historical figures known today as ninja were also samurai, specializing in guerilla tactics and espionage aside from the usual skills samurai were known for. One of the most popular Sengoku-era historians, Stephen Turnbull, has also written a dissertation refuting his own previously published work on ninja, bolstering the theory that a lot of what we know about (real-life, historical) ninja may also be based on legend and unreliable sources.
Ninjas were also quite skilled with a variety of tools, such as the multipurpose kunai. Plainly put, while a stereotypical ninja would jump around on rooftops in ridiculous clothing, a real ninja most likely would simply infiltrate the household staff and poison a meal. Among many other things, a good ninja always knew where his sanjaku tenugui was.
The "classic" black ninja costume is, in fact, the outfit worn by stagehands in traditional Japanese theatre. Japanese stagehands are frequently in full view on the stage, but the audience was meant to ignore them and thus they are considered "invisible" by the audience. It became a practice to hide ninja characters in full sight by putting them in the same outfits as the stagehands, for a startling effect when characters were suddenly attacked by "thin air". The stereotypical black "ninja outfit" would be actually horribly conspicuous, even at night. For night stealth, real ninjas wore dark blue outfits; someone dressed in solid black will stand out like a silhouette. Usually, though, ninjas simply dressed like ordinary people (peasants, monks, merchants, scholars, etc). That way, they can move about unnoticed, day or night. Even the split or toe-divided boots which are a trademark of the ninja costume are actually an Anachronism Stew: toe-divided shoes or ''jika-tabi'' were actually invented in the 20th century, and only some modern ninjutsu schools would adopt them for practicality reasons.
Female ninja are often called kunoichi in a pun on the kanji for woman (女, onna/jo), which looks like it's made up of ku (く), no (ノ), and ichi (一). Kunoichi are often portrayed in media as experts in seduction and poisons. Or both at the same time. Kunoichi are also often seen in outfits that combine a hodgepodge of traditional clothing, fishnet, bared skin, and strategically-placed weapons, and tend to be given the Punny Name of "Shinobu" in media. There may be some Truth in Fiction, as real-life kunoichi would often use their attractiveness to lower the guards of their male targets in order to assassinate them in privacy or bribe information. The most common weapon for them is twin knives, which they Dual Wield and have at least one of them in a Reverse Grip.
In some works of fiction, ninja are divided into three ranks: genin (lower), chūnin (middle), jōnin (upper).
Legendary ninja include Fuuma Kotaro, Hattori Hanzō and Sarutobi Sasuke. During the Sengoku Jidai, the most prolific shinobi were of the Koka or Koga province and the Iga province, rugged, secretive clans notorious for guerilla warfare, unorthodox tactics and selling these services to warlords. Their mysterious histories and supposed rivalry have been popular fodder for Japanese fiction for years. While commonly thought to have originated in Japan, ninjas may have originated in China, and the idea and practice later spread to Japan. Historically, the word "ninja" was not generally used; in Japanese historical documents, shinobi was often used.note
In American movies, especially the ones from the '80s with "ninja" in the titles, only the hero ninja and the Big Bad ninja make any pretense of stealth or invisibility — and sometimes, not even them. Any underling ninjas will be the class of mooks known as Highly-Visible Ninja. In the late 20th Century, they became the arch-enemies of Pirates, for no reason other than the Rule of Cool. Samurai Shinobi is when you mix samurai and ninja together either for Rule of Cool or Artistic License – History.
One of the earliest Japanese cultural tropes to make it to the West, where it has now branched out into the McNinja franchise. Expect the ninja to make use of the Smoke Out, the Flash Step, the Fuuma Shuriken, Kite Riding and the aforementioned Ninja Log.
Compare The Hashshashin, the Middle Eastern counterpart. They're likely to be Stealthy Mooks. See Ninja Tropes for everything related to ninjas.