Let l, r ∈ Z ≥0 . We mathematically study conformal field theories with central charge ( l 2 , r 2 ) which have the symmetry of the (l + r) Virasoro algebras of central charge 1 2 , Vir ⊕lin its holomorphic and anti-holomorphic parts. Such conformal field theories are called (l, r)-code conformal field theories in this paper. We introduce a notion of an (l, r)-framed algebra which is a non-associative finite dimensional algebra and show that the category of (l, r)-code conformal field theories and the category of (l, r)-framed algebras are equivalent. Therefore, the construction of code CFTs are reduced to the construction of framed algebras.For each code G ⊂ Z r 2 satisfying 1 r = (1, 1, . . . , 1) ∈ G, we constructed an (r, r)-framed algebra S G . The corresponding code CFT F G defines a modular invariant conformal field theory. For example, when G = 1 r , the corresponding conformal field theory is the SO(r)-WZW model at level 1 for r ≥ 4 and the critical Ising model (resp. the SO(3)-WZW model at level 2) for r = 1 (resp. r = 3). We can also obtain a family of new conformal field theories by considering nontrivial codes G. All operator product expansions and the four-point correlation functions of these conformal field theories can be computed combinatorially using the codes. Furthermore, by considering the current-current deformation of code conformal field theories, we mathematically construct a continuous family of conformal field theories.