"I don't have to deal with you, but I do have to wreck everything."
~ William while under X.A.N.A.'s control.

William Dunbar is the secondary antagonist in Code Lyoko. He is one of the students at Kadic and Ulrich's rival in competing for Yumi's affection. Alongside Franz Hopper, he is the only character aside from the main group to ever enter Lyoko, but it only caused him to be brainwashed and captured by X.A.N.A., who turned William into his general for most of the Season 4 until the finale.

He was voiced by David Gasman, who also voiced X.A.N.A.


Prior to the series

William Dunbar (Normal)

William in the Real World, before ever entering Lyoko.

William Dunbar was raised by his loving parents, growing up and living a fairly normal life. Before he transferred to Kadic Academy, William was infamous at his previous schools for his "puppy love" and stunts he pulled because of it. His most recent school prior expelled him for strewing love letters around the halls.


William was introduced early in the second season and though his crush on Yumi wasn't obvious in his first couple of episodes, the jealousy he stirred in Ulrich was. His crush on Yumi started showing eventually but in the form of a Casanova facade rather than his usual blind puppy love.

Earthly Encounters

When not advancing on Yumi, William can be seen having heart-to-heart conversations with Ulrich or fighting off XANA's attacks when and how he sees fit. After each time reversion Ulrich goes through, the bad aspects of their relationship are erased and they both gain a mutual respect for each other. Meanwhile, Yumi tends to leave her relationship with him unmended when the group avoids time reversions.

This ultimately piques William's curiosity when she sneaks away from him to fight XANA one night and leaving him in a foul mood the next day. At XANA's next outing, William secretly follows Jeremy and Aelita to the computer lab and gains a broad understanding of XANA, albeit temporarily. When they finally discover XANA's motivations, William and Ulrich get into a fight with a possessed demoman and the fight becomes ingrained into William's memory. The attack is stopped and William is petitioned into fighting XANA with the group, but Yumi vetoes him and his memory is seemingly erased by a time reversion.

Before the last terrestrial sector of Lyoko is destroyed, William tells Yumi about the fight and says he thinks it's a dream. Yumi then asks him to cover for her while she stops XANA's following attack. XANA's attack ultimately succeeds, but Jeremy manages to successfully fabricate a working transfer protocol for Sector 5, and given the pressure surrounding Lyoko's survival Yumi changes her mind and decides to recruit William. She does this by telling William that his dream was real and William accepts.

On a day that real life problems occupy every Lyoko Warrior except for Aelita, she is forced to bring William to Lyoko for the first time when XANA attacks the core. William's brashness and lack of training lead him to become separated from Aelita and attacked by a Scyphozoa. William then falls under XANA's control, devirtualizes Aelita and proceeds to the core to destroy Lyoko. In spite of the remaining Lyoko Warriors' efforts, William destroys the core and is deleted along with Lyoko. However, XANA's possession allows it to salvage William's DNA codes from the network and recreate William as XANA's general.

Executing XANA's Ultimate Plan

The Lyoko Warriors manage to recreate Lyoko with data shared by Franz Hopper along with staving off Kadic and the authorities by posing as William over the phone. With Lyoko's rebirth, XANA sends William back to Earth as a double agent to get close to Aelita and while the Lyoko Warriors were questioning the circumstances that led to William coming back, he kidnaps her and attempts to delete her. When that fails, the group decides to create a spectre to pose as William on Earth, however the duplicate William was significantly dumber than the real one and would often cause others to suspect his behavior.

XANA would continue to use William as its personal warrior, both to have a more effective method to battle the Lyoko Warriors than simple monsters and to exploit their guilt over William's predicament. William's attacks often involve threatening Aelita's life or slowing down the Lyoko Warrior's schemes. Though William is often defeated in combat, he still usually succeeds in preventing the Lyoko Warriors from making any significant progress in their war against XANA. These attacks are seemingly random, but as XANA grows in strength, William is forced to take different approaches in order to hide its agenda. This includes using a digital submarine that was stolen by the Schyphoza to delete the Lyoko Warriors individually and defending the Lyoko replicas by entering a kill code into the original sub during their earthbound teleportation. It is then revealed that William is specifically targeting Aelita because her deletion can draw Franz Hopper from the recesses of the network at which point XANA can attack and eventually kill him.

During the first attack on the fourth replica, XANA teleports William to Earth as a spectre in Lyoko form in order to stop the teleportation without the kill code. This turns out to be a miscalculation, as Aelita discovers William's exposed DNA codes in the tower that XANA used to send William to Earth. At the same time though, XANA also collects power from the replicas to generate a new monster which causes the Lyoko Warriors to retreat. This new monster dubbed "the Kolossus" aids William in defending the replica during the second attempt. Where the Kolossus succeeds, William fails due to being devirtualized and reconstituted on Earth, freeing him from XANA's control.

XANA's Endgame

William does manage to take hold of his life, in light of the spectre's blunders, but he is not on the best terms with the Lyoko Warriors due to the conscious folly that got him possessed. When they go to the factory for what would appear to be the last time, William follows them and volunteers to go to Lyoko. However, they decide to only have him come as potential backup. XANA, in an act of desperation, decides to possess William on Earth with its most personable spectre and have him disable the factory and Jeremy. Following the release of the Anti-XANA program, the spectre is expelled from William's body, screaming and writhing in pain assuring the program's destruction.

Forgetting XANA

Though William did not have a say in shutting down the supercomputer following XANA's destruction, he convinces Yumi that her conviction to shut it down is the right thing as they reminisce on their previous fights. Ultimately, when the supercomputer is shut down, William is not seen after the fact, but it is assumed that he moved on with the rest of the group and left XANA behind as a bad memory.

Code Lyoko Evolution

In Code Lyoko Evolution, William becomes a full member of the group and fights alongside them against X.A.N.A.. In "The Codeless" when Jeremy virtualized Yumi and William to the Desert Sector to deactivate the tower they noticed that there was another William that looks exactly like him but his skin was light green. Yumi was about to attack him but was punched and lost some of her life points. As Jeremy tells her to be very extra careful not to lose any more life points, the William clone begins to welcome the real William back home on Lyoko which he begins to know that William has feelings for her and he begins to know that he becomes rejected manipulated and always the team waited for him and then reject him after that she tells him not to listen to him he brings up all the past memories of months ago when he was on there he was a king and all the monsters obey his every command tell him that and no one didn't hurt him anymore.

Yumi tries to tell him to snap out of it but became in raged of being rejected as he begins to go with him she tried to convince him not to listen to them anymore he begins to use his blade by telling her to be quiet however she begins to tell him that he only want their codes and doesn't care about him As yumi becomes double cross and run away clone William told him She abandoned you again, yumi becomes very scared of William and his clone are coming after her however she became trapped and nowhere else to go she and Jeremy was trying to convince him to not do this however he played along and attacked his clone realizing that his friends and saving the world is more important than being a king and a slave of X.A.NA again As clone William became disappointed of the choice that he made and go straight after yumi she managed to go to the Tower but she was blocked by his evil clone however he Manage to stop his clone and defeated him.

However in the episode "Mutiny", William is once again pocesed by X.A.N.A. using the scyphozoa although it is not a full conversion as it's tentacles are still attached to him. William then leads an army of Krabes to kill the group. They try to talk him down but it doesn't work. Ulrich then distracts him and his monsters (as he is in control of them) which gives the rest of them enough time to cut the tentacles which frees William and kills all the monsters.

Powers and Abilities

On Earth

William has slightly above-average athleticism and combat training to a point where he is capable of balancing himself on a makeshift staff while performing a kick that can hit four people in one swing. Other than that, he is still human and has no notable physical traits.

As a spectre, he gains incredible strength and speed, the ability to shoot lighting, and is completely indestructible due to his incomparable connection to Lyoko. The only time this connection failed to sustain him is when his Lyoko form was tethered to a tower on the Siberian replica. William's unique connection to XANA allows him to survive anything that would kill any other virtualized human. During his possession, he is completely incapable of being separated from Lyoko, even when devirtualized by the Lyoko Warriors. Whenever he needs to retreat, his first instinct is to jump off Lyoko and delete himself. Supposedly, he's also immune to the extreme physical trauma from more pain-inducing injuries, since he didn't experience any PTSD after returning to his human form.

On Lyoko

William is statistically more powerful than three of the Lyoko Warriors combined due to XANA's augmentations. He has three times the amount of life-points and is able to take multiple hits from Aelita's energy blasts and Odd's Laser Arrows, both of which could devirtualize anyone else in one or two shots. William's most iconic power is his "Super Smoke" an ability explicitly given to him through XANA's design. With it, he can dispense small clouds of black smoke to throw or carry his enemies. This ability also allows him to turn into a slightly larger cloud that is indestructible, has omnidirectional transport range and can fly at higher speeds than Aelita's wings. William's suit is also equipped with a spiked brace on the left arm, which usually blocks damage, but has been seen taking damage from Yumi's fans. Inherently, after being possessed by XANA, William has total command over XANA's monsters, as he has been shown telling them to perform near/totally suicidal attacks on multiple occasions.

William's Lyoko Warrior weapon is a zweihander sword that can be called upon and concealed with his Super Smoke. The sword itself can absorb energy, perform energy slashes of varying strength and it allows William to hover and glide while not in his cloud state. It is also the most powerful weapon used aground in the whole series, being capable of devirtualizing or breaking any entity. The only time it fails to devirtualize is when the object being struck has life points that are dependant on a weak spot, like Ulrich's swords, or if its blade is being blocked by something that has higher hit points, such as Aelita's merged energy fields. The sword is powerful enough to destroy energy shields, which have tens-of-thousands of hit points, in two-to-three strikes. It is unknown what the Eye of XANA located on the center of the sword does, but it has been snown to make the entire sword light up with red shockwaves when struck, which indicates that the sword can possibly be destroyed by hitting it hard enough, but this has never happened. Though the sword is powerful, it is too heavy for William to control without both hands. When not propped over his shoulder, the sword is usually being dragged around or is concealed until William summons it. William also has a habit of impaling his sword into the ground too hard and needs time to pull it out again, at which point he either results to hand-to-hand combat or gets devirtualized from leaving his guard down for too long.

In terms of off-hand equipment, William is capable of summoning a black Manta from under Lyoko, which he can ride and create reigns for using his Super Smoke. When fighting inside the Digital Sea, he uses a submarine called the Rorkai, a blockier version of the one Lyoko Warriors' submarine pods. It has the same equipment and life energy, but it apparently cannot shield itself from torpedoes launched by the submarine pods, and two torpedoes it launches can't even down the shields of the main sub.


William Dunbar (Normal-Lyoko)

William's Lyoko form, after being possessed, but before his complete transformation.

William initially comes off as being a normal teenager with well-behaved tendencies. The tendencies stem from an obsession of expressing his puppy love, which he has been known to be expelled from previous schools over. As the series progresses, William falls in love with Yumi Ishiyama and tries to advance on her to no avail and realizes that she is more interested in Ulrich, but still persists. When his curiosity is piqued, he becomes somewhat argumentative and obnoxious to the point of impulsively stalking Jeremy and Aelita just because they're Yumi's closest friends, and ignoring important advice from Aelita just to have fun destroying XANA's monsters. However, despite all of this, William is both noble and humble enough to help people he doesn't like, which is how he earned Ulrich's respect during XANA's various attacks.

After XANA takes permanent control of him, William is initially stoic and sometimes callous, saying very few words though the words spoken are harsh and commanding. His hypnotic dedication to XANA even encourages him to shout "FOR XANA!" during battle. As the possession deepens William stops targeting Yumi and develops a sadistic obsession with Aelita, along with speaking more frequently. Even under XANA's control, William takes a cunning human approach to dealing with the Lyoko Warriors: he has even used his normal, unsynthesized voice to fool the Lyoko-warriors into believing he was freed from XANA's control.

According to the writers, William is usually running through battle simulations when not on Lyoko to widen his strategic range and his inability to be reasoned with while possessed is because he subconsciously blames the Lyoko Warriors, especially Yumi, for his enslavement.

According to the series bible, William is not incorruptible. Had Code Lyoko carried on beyond season 4, William would have become an agent of XANA again, this time of his own accord, and played a part in its resurrection.


           Cartoon Network 2010 logo Villains

TV Series
Red Guy | I.R. Baboon | XANA | Scyphozoa | Men in Black | William Dunbar | The Announcer's Remote Control | Strike (OK K.O.! Let's be Heroes)

Tv Movie Villains

Dexter's Laboratory
Mandark | Quackor | Crazy Robot | Badaxtra | Hookocho | Lalavava | Comrade Red | Mental Mouse | Huntor | Peltra | Simion | Orgon Grindor | Dynomutt X-90

Foster's Home for Imaginary Friends
Terrence | Bendy | Berry | Kip Snip | Lil' Lincoln | Nemesis | Omnizot | World

Ed Edd n' Eddy
Kevin | Kanker Sisters | Eddy's Brother

Grim Adventures of Billy & Mandy
Grim | Mandy | Nergal | Eris | Bogeyman | Jack O' Lantern | Pinocchio | Geppetto | Cthulhu | Morg | Bunny | Delightful Reaper | Bun Bun | Pan-dora | Hoss Delgado | Hector Con Carne | General Reginald Skarr | Brain-Eating Meteor | Mask of the Beast | Lord Moldybutt | Major Doctor Ghastly | Lionel Van Helsing | Nancy Claus | Estroy | John Jack Daniel Torrance | Wiggy Jiggy Jed | Yaap Yaap | Triceratron | Clowns | Lord Pain | Professor Death Ray Eyes | New Mandy | Super Chicken | Dreadbots | Arachnotaur | Velma Green the Spider Queen |

Hi Hi Puffy AmiYumi
Axel & Rod Skidmark | Eldwin Blair | Mr. Darrell | Mr. Master | P.A.L. | Rumaki | Sauerkraut Malone |

Camp Lazlo
Edward Platypus | Ms. Mucus | Scoutmaster Lumpus | Edward's brothers

My Gym Partner's a Monkey
Bobby Lion | Bull Sharkowski | Chad | Euripides Sharkowski | Larry Raccoon | Lola Llama | Possum Girl | Principal Wolverine | Rick Platypus | Mr. Cheetah | The Spiffies

Miss Endive | Gorgonzola | Reuben | Chestnut | Funjl | Meaches |

Johnny Test
Bling-Bling Boy | Mr. Mittens | Brain Freezer | Zizrar the Mole King | The Beekeeper | Dark Vegan | Bumper Randalls | Road Burn

We Bare Bears
Pom Pom | Dave (We Bare Bears) | Ralph (We Bare Bears) | Wolves (We Bare Bears) |

New Looney Tunes
Yosemite Sam | Ivana | Rhona Roundhouse | Carl the Grim Rabbit | Elmer Fudd | Marvin the Martian | King Thes|

Mighty Magiswords

The Life & times Juniper Lee

Over the Garden Wall


Craig of The Creek
Carter Brown

Mao Mao: Heroes of Pure Heart

Community content is available under CC-BY-SA unless otherwise noted.