The Oak Brook, Ill., company said U.S. same-store sales climbed 2.6 percent because of new products, including McCafe espresso-based coffee.
European same-store sales surged 7.2 percent, helped by growth in France and the U.K.
Same-store sales for Asia Pacific, the Middle East and Africa rose 2.1 percent, as strength in Australia helped offset weakness in China. Longer operating hours also boosted sales.
McDonald's same-store sales, or sales at restaurants open at least 13 months, are a key indicator of performance because they measure growth at existing restaurants rather than newly opened ones.
Total sales declined 0.3 percent because of currency translation.
McDonald's shares rose 80 cents to $56 in premarket trading.
Many companies that sell their products abroad convert sales from foreign currencies back to dollars when reporting financial results. When the dollar is stronger than those currencies, it results in fewer dollars in revenue.
McDonald's results have benefited from consumers trading down to cheaper meal options amid the recession, but its second-quarter profit declined 8 percent because of the stronger dollar and a year-ago gain. Year-ago results also benefited from a better economy and stimulus checks, the company said.
McDonald's, which has at least 32,000 restaurants worldwide, plans to release August same-store sales on Sept. 9.