There are many versions of the Jedi Code. We typically refer to the four line or Anderson code as the Jedi Code, as that appeared first in the fiction (in the order of book release, not the fictional timeline). There are many variations however, as we will bow to Wookieepedia for a useful description of the different codes.
(from http://starwars.wikia.com/wiki/Jedi_Code)
One of the key portions of the Code was a five-line mantra. Several versions of the mantra exist, though the older version was:
Emotion, yet peace.
Ignorance, yet knowledge.
Passion, yet serenity.
Chaos, yet harmony.
Death, yet the Force.
The refined version established by Odan-Urr was perhaps the best known:
There is no emotion, there is peace.
There is no ignorance, there is knowledge.
There is no passion, there is serenity.
(There is no chaos, there is harmony.)(*)
There is no death, there is the Force.
- The Jedi Code (Based on the meditations of Odan-Urr)
(*)The fourth line "There is no chaos, there is harmony," is removed in some Jedi texts. At the Funeral of Mara Jade Skywalker, for instance, this line was omitted.
The Jedi Code was rewritten by Grand Master Luke Skywalker upon reestablishing the Jedi Order in the Galaxy:
Jedi are the guardians of peace in the galaxy.
Jedi use their powers to defend and to protect.
Jedi respect all life, in any form.
Jedi serve others rather than ruling over them, for the good of the galaxy.
Jedi seek to improve themselves through knowledge and training.