Let A be an associative algebras over a field of characteristic zero. We prove that the codimensions of A are polynomially bounded if and only if any finite dimensional algebra B with Id(A) = Id(B) has an explicit decomposition into suitable subalgebras; we also give a decomposition of the n-th cocharacter of A into suitable Sn-characters. We give similar characterizations of finite dimensional algebras with invo-lution whose *-codimension sequence is polynomially bounded. In this case we exploit the representation theory of the hyperoctahedral group. §1. Introduction Let F be a field of characteristic zero and F X = F x 1 , x 2 ,. .. the free algebra of countable rank over F. If A is a PI-algebra over F , that is, an algebra satisfying a polynomial identity, we let Id(A) be the T-ideal of F X of identities of A. It is well known that Id(A) is completely determined by the multilinear polynomials it contains; if V n = Span{x σ(1) · · · x σ(n) | σ ∈ S n } is the space of multilinear poly-nomials in x 1 ,. .. , x n , then the sequence c n (A) = dim F Vn Vn∩Id(A) , n = 1, 2,. .. , is called the sequence of codimensions of A and it is an important numerical invariant of Id(A). It was proved by Regev in [R] that for any PI-algebra A, c n (A) is exponentially bounded, i.e., there exist constants a, α > 0 such that c n (A) ≤ aα n for all n. In this paper we study algebras A whose codimension sequence is polynomially bounded i.e., such that for all n, c n (A) ≤ an t for some constants a, t. Kemer in [K1] gave a characterization of such T-ideals in the language of the representation theory of S n. It also follows from [K2] that if c n (A) is polynomially bounded, then Id(A) = Id(B) for a suitable finite dimensional algebra B. For any finite dimensional algebra A over an algebraically closed field we shall prove that A has polynomial growth of the codimensions if and only if A = A 0 ⊕A 1 ⊕ · · · ⊕ A m where A 0 , A 1 ,. .. , A m are F-algebras such that 1) for i = 1,. .. , m, A i = B i + J i , where B i ∼ = F and J i is a nilpotent ideal of A i , 2) A 0 , J 1 ,. .. , J m are nilpotent right ideals of A and 3) A i A k = 0 for all i, k ∈ {1,. .. , m}, i = k and B i A 0 = 0.