The present study develops the scaled boundary finite element method (SBFEM) to derive the J-integral directly based on defining the rectangular contour. To achieve this, firstly the J-integral is calculated for each element with different path integrals of radial direction in an arbitrary subdomain. Then, the computed values of elements are summed in the entire domain. Finally, to validate and displaying the efficiency of the SBFEM solution, three two-dimensional (2D) numerical examples are solved for different integration paths. The results indicate path-independent property and fast convergency of this semi-analytical method in the term of J-integral computation.