Show Side Bar

Coordinate Converters

This API provides coordinates between EPSG 3414 (SVY21), EPSG 3857 and EPSG 4326 (WGS84) formats.



4326(WGS84) to 3857

This API converts coordinates from EPSG:4326 to EPSG:3857.

Possible Error Responses

400 - Please send the access token in the request header as a bearer token.

400 - Please input both latitude and longitude coordinates.

401 - Token has expired: Session expired. Please refresh your token (if still within refresh window) or re-login.

401 - Invalid token: Could not decode token: The token xxx; is an invalid JWS.

403 - Access Forbidden. GET access to component 'xxx' of service 'xxx' is not allowed by this user's role.

429 - API limit(s) exceeded.


HEADER PARAMETERS

AuthorizationstringRequired

API token provided by the Authentication Service.

QUERY PARAMETERS

latitudestringRequired

Latitude coordinates in WGS84 format.

longitudestringRequired

Longitude coordinates in WGS84 format.

GET
/api/common/convert/4326to3857


Sample Request

GET
/api/common/convert/4326to3857?latitude=1.319728905&longitude=103.8421581
1const url = "https://www.onemap.gov.sg/api/common/convert/4326to3857?latitude=1.319728905&longitude=103.8421581"; 2const authToken = '**********************'; // Replace with your access token 3 4fetch(url, { 5 method: 'GET', 6 headers: { 7 'Authorization': `${authToken}`, // API token for authorization 8 } 9}) 10.then(response => response.json()) // Parse response as JSON 11.then(data => console.log(data)) // Log the data to the console 12.catch(error => console.error('Error:', error)); // Log any errors

Sample Response
1{ 2 "Y": 146924.54200324757, 3 "X": 11559656.16256661 4}

4326(WGS84) to 3414(SVY21)

This API converts coordinates from EPSG:4326 to EPSG:3414.

Possible Error Responses

400 - Please send the access token in the request header as a bearer token.

400 - Please input both latitude and longitude coordinates.

401 - Token has expired: Session expired. Please refresh your token (if still within refresh window) or re-login.

401 - Invalid token: Could not decode token: The token xxx; is an invalid JWS.

403 - Access Forbidden. GET access to component 'xxx' of service 'xxx' is not allowed by this user's role.

429 - API limit(s) exceeded.


HEADER PARAMETERS

AuthorizationstringRequired

API token provided by the Authentication Service.

QUERY PARAMETERS

latitudestringRequired

Latitude coordinates in WGS84 format.

longitudestringRequired

Longitude coordinates in WGS84 format.

GET
/api/common/convert/4326to3414


Sample Request

GET
/api/common/convert/4326to3414?latitude=1.319728905&longitude=103.8421581
1const url = "https://www.onemap.gov.sg/api/common/convert/4326to3414?latitude=1.319728905&longitude=103.8421581"; 2const authToken = '**********************'; // Replace with your access token 3 4fetch(url, { 5 method: 'GET', 6 headers: { 7 'Authorization': `${authToken}`, // API token for authorization 8 } 9}) 10.then(response => response.json()) // Parse response as JSON 11.then(data => console.log(data)) // Log the data to the console 12.catch(error => console.error('Error:', error)); // Log any errors

Sample Response
1{ 2 "Y": 33554.4360965479, 3 "X": 28983.75169436287 4}

3414(SVY21) to 3857

This API converts coordinates from EPSG:3414 to EPSG:3857.

Possible Error Responses

400 - Please send the access token in the request header as a bearer token.

400 - Please input both Y and X coordinates.

401 - Token has expired: Session expired. Please refresh your token (if still within refresh window) or re-login.

401 - Invalid token: Could not decode token: The token xxx; is an invalid JWS.

403 - Access Forbidden. GET access to component 'xxx' of service 'xxx' is not allowed by this user's role.

429 - API limit(s) exceeded.


HEADER PARAMETERS

AuthorizationstringRequired

API token provided by the Authentication Service.

QUERY PARAMETERS

YstringRequired

Y coordinates in SVY21 format.

XstringRequired

X coordinates in SVY21 format.

GET
/api/common/convert/3414to3857


Sample Request

GET
/api/common/convert/3414to3857?X=28983.788791079794&Y=33554.509813284
1const url = "https://www.onemap.gov.sg/api/common/convert/3414to3857?X=28983.788791079794&Y=33554.509813284"; 2const authToken = '**********************'; // Replace with your access token 3 4fetch(url, { 5 method: 'GET', 6 headers: { 7 'Authorization': `${authToken}`, // API token for authorization 8 } 9}) 10.then(response => response.json()) // Parse response as JSON 11.then(data => console.log(data)) // Log the data to the console 12.catch(error => console.error('Error:', error)); // Log any errors

Sample Response
1{ 2 "Y": 146924.61623595929, 3 "X": 11559656.199673364 4}

3414(SVY21) to 4326(WGS84)

This API converts coordinates from EPSG:3414 to EPSG:4326

Possible Error Responses

400 - Please send the access token in the request header as a bearer token.

400 - Please input both Y and X coordinates.

401 - Token has expired: Session expired. Please refresh your token (if still within refresh window) or re-login.

401 - Invalid token: Could not decode token: The token xxx; is an invalid JWS.

403 - Access Forbidden. GET access to component 'xxx' of service 'xxx' is not allowed by this user's role.

429 - API limit(s) exceeded.


HEADER PARAMETERS

AuthorizationstringRequired

API token provided by the Authentication Service.

QUERY PARAMETERS

YstringRequired

Y Coordinates in SVY21 format.

XstringRequired

X Coordinates in SVY21 format.

GET
/api/common/convert/3414to4326


Sample Request

GET
/api/common/convert/3414to4326?X=28983.788791079794&Y=33554.5098132845
1const url = "https://www.onemap.gov.sg/api/common/convert/3414to4326?X=28983.788791079794&Y=33554.5098132845"; 2const authToken = '**********************'; // Replace with your access token 3 4fetch(url, { 5 method: 'GET', 6 headers: { 7 'Authorization': `${authToken}`, // API token for authorization 8 } 9}) 10.then(response => response.json()) // Parse response as JSON 11.then(data => console.log(data)) // Log the data to the console 12.catch(error => console.error('Error:', error)); // Log any errors

Sample Response
1{ 2 "latitude": 1.3197295716669164, 3 "longitude": 103.84215843333567 4}

3857 to 3414(SVY21)

This API converts coordinates from EPSG:3857 to EPSG:3414

Possible Error Responses

400 - Please send the access token in the request header as a bearer token.

400 - Please input both Y and X coordinates.

401 - Token has expired: Session expired. Please refresh your token (if still within refresh window) or re-login.

401 - Invalid token: Could not decode token: The token xxx; is an invalid JWS.

403 - Access Forbidden. GET access to component 'xxx' of service 'xxx' is not allowed by this user's role.

429 - API limit(s) exceeded.


HEADER PARAMETERS

AuthorizationstringRequired

API token provided by the Authentication Service.

QUERY PARAMETERS

YstringRequired

Y Coordinates in SVY21 format.

XstringRequired

X Coordinates in SVY21 format.

GET
/api/common/convert/3857to3414


Sample Request

GET
/api/common/convert/3857to3414?Y=146924.54200324757&X=11559656.16256661
1const url = "https://www.onemap.gov.sg/api/common/convert/3857to3414?Y=146924.54200324757&X=11559656.16256661"; 2const authToken = '**********************'; // Replace with your access token 3 4fetch(url, { 5 method: 'GET', 6 headers: { 7 'Authorization': `${authToken}`, // API token for authorization 8 } 9}) 10.then(response => response.json()) // Parse response as JSON 11.then(data => console.log(data)) // Log the data to the console 12.catch(error => console.error('Error:', error)); // Log any errors

Sample Response
1{ 2 "Y": 33554.4360965483, 3 "X": 28983.75169436287 4}

3857 to 4326(WGS84)

This API converts coordinates from EPSG:3857 to EPSG:4326

Possible Error Responses

400 - Please send the access token in the request header as a bearer token.

400 - Please input both Y and X coordinates.

401 - Token has expired: Session expired. Please refresh your token (if still within refresh window) or re-login.

401 - Invalid token: Could not decode token: The token xxx; is an invalid JWS.

403 - Access Forbidden. GET access to component 'xxx' of service 'xxx' is not allowed by this user's role.

429 - API limit(s) exceeded.


HEADER PARAMETERS

AuthorizationstringRequired

API token provided by the Authentication Service.

QUERY PARAMETERS

YstringRequired

Y coordinates in SVY21 format.

XstringRequired

X coordinates in SVY21 format.

GET
/api/common/convert/3857to4326


Sample Request

GET
/api/common/convert/3857to4326?Y=146924.54200324757&X=11559656.16256661
1const url = "https://www.onemap.gov.sg/api/common/convert/3857to4326?Y=146924.54200324757&X=11559656.16256661"; 2const authToken = '**********************'; // Replace with your access token 3 4fetch(url, { 5 method: 'GET', 6 headers: { 7 'Authorization': `${authToken}`, // API token for authorization 8 } 9}) 10.then(response => response.json()) // Parse response as JSON 11.then(data => console.log(data)) // Log the data to the console 12.catch(error => console.error('Error:', error)); // Log any errors

Sample Response
1{ 2 "latitude": 1.3197289050000036, 3 "longitude": 103.8421581 4}