Latitude-Longitude to/from UTM Coordinate-Converter

Enter coordinate lines here:

OR supply a file containing such lines:

UTM 4-word style
LL degrees
LL degrees:minutes
LL degrees:minutes:seconds
UTM signed
LL signed
UTM 3-word style

50.26     -96          ##convert Latitude:50.26 Longitude:-96 to UTM
50:15.6   -96          ##same as preceding, but using degrees:minutes
50:15:36N  96W         ##same as preceding, but using degrees:minutes:seconds and N|S E|W signs
N50:15:36  W96         ##same as preceding (alphabetic sign can be at either end of a coordinate)
14 501000 -5666777     ##convert Zone:14 Easting:501000 Northing:-5666777 to LatLong
14 501000 S4333223     ##same as preceding;  Northing as S followed by Northing-plus-ten-million
14 S 501000 4333223    ##same as preceding, in the 4-word style

Instructions:  Each line has either 2 or 3 or 4 words, where 2 words are taken to be Latitude and Longitude, 3 words are Zone Easting Northing, 4 are Zone N|S Easting Northing;  Latitude and Longitude are in degrees or degrees:minutes or degrees:minutes:seconds with north and east positive, S and W are alternate minus-signs;  Zone is an integer 1..60;  Easting in metres with origin for zone#N at 500,000m west of longitude N*6-183°;  northing is metres from equator with north positive;  in the 3-word style, Northing is northing or the letter S followed by northing-plus-ten-million;  in the 4-word style when 2nd word is S, Northing is northing-plus-ten-million;  in the signed style, Northing is northing;  your input can have comments, anything from '#' to end-of-line will be ignored, however such comments will be echoed to the output;