The dependence of critical current density (J(c)) on the angle between the current direction and the (100) direction in the ab-plane of thin YBCO films deposited on (001)-SrTiO3 from natiocrystalline and microcrystalline targets is studied using magneto-optical microscopy. In the films made from the nanocrystalline target it is found that J(c) does not depend on the angle whereas J(c) decreases with increasing angle in the films made from the microcrystalline target. The films were characterized by detailed X-ray diffraction measurements. The findings are explained in terms of a network of planar defects indicating that in addition to linear defects also the twin boundaries are very important flux pinning sites. (c) 2005 Elsevier B.V. All rights reserved.