Williamsburg is an independent city in the U.S. state of Virginia. Located on the Virginia Peninsula, Williamsburg is in the northern part of the Hampton Roads metropolitan area. It is bordered by James City County and York County.