Several low-dimensional systems show a crossover from diffusive to ballistic heat transport when system size is decreased. Although there is some phenomenological understanding of this crossover phenomena in the coarse grained level, a microscopic picture that consistently describes both the ballistic and the diffusive transport regimes has been lacking. In this work we derive a scaling from for the thermal current in a class of one dimensional systems attached to heat baths at boundaries, and show rigorously that the crossover occurs when the characteristic length scale of the system competes with the system size.