Simple Mapcode CSV Converter

This page allows you to upload a CSV file with coordinates and convert them to mapcodes, also in CSV format. The input CSV file needs to have 3 columns:
latitude (in degrees), longitude (in degrees), territory (optional)
Field delimiter: , (comma)
Decimal point: . (dot)

The column context is used to specify the territory code for which the shortest mapcode should be displayed. For example, for South Africa, this would be ZAF. Note that if you leave the field empty, the result might not be what you expected. The system may choose a nearby territory instead.

Example of an input CSV file:

-28.700225, 28.602905, (note the territory is missing)
-28.700225, 28.602905, ZAF
-28.433676, 19.986191, ZAF

This produces the following output:

latitude,longitude,mapcode,international
-28.700225,28.602905,LSO MRG.8XX,8KYVG.4C8Y
-28.700225,28.602905,ZAF QNW2.Y72,8KYVG.4C8Y
-28.433676,19.986191,ZAF 6MQP.506,8K70Z.7PB4

The output is formatted in CSV format. In some browsers this will automatically be saved to a file called mapcodes.csv in your Downloads folder. However, not all browsers support this functionality. Some will show the contents of the file on your screen instead and you'll need to copy or save it to a CSV file yourself then. (Note: We've tried this with Google Chrome and it seems to work fine.)

Troubleshooting: If you select a CSV file and nothing happens, the format of the input file is not OK. It should contain exactly 3 columns, separated by comma's and the latitude/longitudes must use decimal points. Try saving the example text from above in a file and use that first, in that case.
Note that this page is just an example. If you wish to have better error checking and more options, feel free to use and adapt the source files to your needs. They can be found here on Github.

Useful links:
List of territory codes
Source files on Github