BEIJING—China has revised the way it measures the size of its economy, the first such change since 2002, in what it says is an effort to better align its data with international standards.

The country’s National Bureau of Statistics unveiled the revisions in a statement posted on its website Friday, three days before the release of its closely watched gross domestic product data for the second quarter.

The...