Your technology level seems to be roughly 1700s-ish...I'm not sure if that is what you were going for but thats the impression I got from your question.
Your city is 8km across, so for a circle with radius 4km, you get 50km^2 area. For a 8km edge square you get 64 km^2. Here are your best comparisons that I could find good data on:
Asian Cities
Vijayanagar in South India had city walls enclosing 25km^2, and outer walls enclosing 650km^2 which included farmland, gardens, and suburban residences for the rich. It had a population of 500,000 in 1500AD, most of that probably within the inner walls.
Beijing's old city walls came in two sets, the inner city and outer city. These were not one inside the other, but two city walls right next to each other, about 2km apart. Together they enclosed an area of about 50 km^2, almost a perfect 8x8 km square except for the gap between the two sets of walls. Both walls were completed by 1550. Beijing's population from then until 1800 ranged from 700,000 to 1.1 million, though by that time many people probably lived outside the walls.
The density of these two cities would have been about in the ballpark of 20,000/km^2, so that is probably a good benchmark for your city.
Middle Eastern Cities
These cities tended to by hyper-dense, and remain so today. Cairo is one of the densest cities in the world, and pre-civil war Aleppo and Damascus were as well.
Istanbul didn't grow beyond the Theodosian Walls until the 1800s, except for Galata, across the Golden Horn. I measured on a map and estimate the area to be about 10 km^2. Istanbul's population from the 1550s to 1800 was probably in the 500,000-700,000 range for a density of 50,000-70,000/km^2.
I couldn't get good are data for Cairo, but I think its density was in the 50,000km^2 range also at its peak in the 1300s-1400s. Its footprint was pretty small. Cairo had 'skyscrapers' like the Roman insulae, and may have been built up vertically more than any other city before the 1800s.
European Cities
European cities only had desely populated city cores (of 2-5 km^2) and had more extensive suburbs than China and South Asia. Its tough to find a European city as big as yours with a reliable census figure.
Naples, Italy was 484,000 people at the census of 1861 in an area of 117 km^2.
The central bits of London (defined here as the City of London, plus Finsbury, Shoreditch, Bethnal Green, Stepney, Holborn, Southwark, and Bermondsey) has an area of 29 km^2 and population in 1801 census of 401,000. Greater London had 959,000 people in an area of 5223 km^2.
Paris's administrative limits cover 106 km^2. Its population ranged from 420,000 in the early 1600s, to about 630,000 right before the french revolution.
So for Europe, Naples and Paris's density was in the range of 5,000/km^2 for a larger area, while London's inner core had a density about 15,000/km^2, or a little less than the Asian cities. If you want your capital to have more parkland and suburbs, or have a more European/Renaissance character, go with those numbers.