Binary Converter API

Binary Converter
About

API Version:

The Binary Converter allows you to convert numbers between different bases: binary, octal, decimal, and hexadecimal.

Usage

Send a GET request to /api/binary/:binary_number to convert a number between bases.

Example - Browser:

https://networkcalc.com/api/binary/00001111

Example - cURL:

curl https://networkcalc.com/api/binary/00001111

Example - PowerShell:

(Invoke-RestMethod https://networkcalc.com/api/binary/00001111).converted

You can specify the radix (base) of the number you want to convert from and to. The example below shows a conversion from binary (base 2) to hexadecimal (base 16):

?from=2&to=16

Valid bases to convert between are: 2, 8, 10, 16

Results
Name Type Description
status string The status of the request.
'OK' is a good request.
'NO_NUMBER_SPECIFIED' means you did not specify a number to convert. Assumes '00001010'.
'INVALID_NUMBER_FORMAT' means the requested binary number is malformed.
'INVALID_FROM_BASE' means the base you are converting from is not valid.
'INVALID_TO_BASE' means the base you are converting to is not valid.
original string The requested binary number.
converted number The binary number converted to decimal. null if an error occurred.
Sample Output
GET
https://networkcalc.com/api/binary/11100111?from=2&to=10