We give linear time algorithms constructing canonical representations of partial 2-trees (series parallel graphs) and partial 3-trees.