For instance the patent number US123456A1 originates form the USA. A patent number looking like AU1234567A1 originates from Australia. Thanks to the country codes it is very easy to interpret the origin of a patent.
A full list of all country codes and their respective country can be found here.
There are some exceptions when looking at country codes. Sometimes you might see the two letter code WO this refers to a publication from a PCT application (Patent Cooperation Treaty), which is the international patent system, and stands for Written Opinion.
WIPO is an agency of the United Nations, and it is this body's responsibility to oversee and administer a number of international treaties relating to patents and intellectual property in general. The Patent Cooperation Treaty is monitored by WIPO, which provides a common procedure for filing patent applications across its contracting member countries. At present, there are 184 members of WIPO, including the United States, China and several European countries.
You will also see a lot of patent numbers starting with EP. These patent applications belong to The European Patent Convention (EPC) which is an agreement between the European countries. The EPC allows you to by a single patent application apply for a patent at the European Patent Office (EPO).
EPO reviews and examines the application and can grant a patent in the member states. One single application is enough, but if it is granted you must provide a translation of the patent, and pay the fees, in the countries where you want the patent to be valid in the end.
Another exception is OA which relates to The African Regional Intellectual Property Organization (ARIPO which is an intergovernmental organization for cooperation among African states in patent and other intellectual property matters).
You might also encounter EA which is the Eurasian Patent Organization. There are 8 member states: Turkmenistan, the Republic of Belarus, the Republic of Tajikistan, Russia, the Azerbaijan Republic, the Republic of Kazakhstan, Kyrgyzstan, and Armenia
In the IamIP platform the country of the patent application is additionally visualised by a flag as shown below: