3 chars · 1 line
62 chars · 4 lines
3 chars · 1 line
62 chars · 4 lines
Integer base conversion guide
Paste a whole number into the converter above using ordinary decimal digits or a 0x, 0b, or 0o prefix. VetaTool returns the same integer in decimal, hexadecimal, binary, and octal with browser-native BigInt precision, so large identifiers and bit masks are not rounded through JavaScript Number values. This tool is free to use. No account or payment is required.
Last updated
Unprefixed digits are treated as decimal. A 0x prefix selects hexadecimal, 0b selects binary, and 0o selects octal. Prefix matching is case-insensitive, while hexadecimal output uses uppercase A–F for easier scanning.
Digits are validated against the detected base before conversion, so values such as 0b102 or 0o89 are rejected instead of being partially parsed.
The converter uses BigInt rather than JavaScript Number for integer parsing and formatting. That avoids precision loss above 9,007,199,254,740,991, which matters for large IDs, 64-bit values, masks, and protocol fields copied from logs or source code.
This tool intentionally handles whole integers only. Floating-point numbers, scientific notation, fractions, and byte-string decoding are separate problems and are not guessed here.
Parsing and base conversion run entirely in your browser. The integer is not sent to a VetaTool processing server, and the result can be copied or downloaded locally.
The hexadecimal value 0xFF represents the same integer as decimal 255, binary 11111111, and octal 377.
0xFFDecimal: 255
Hexadecimal: 0xFF
Binary: 0b11111111
Octal: 0o377Common questions
The tool accepts decimal, hexadecimal with 0x, binary with 0b, and octal with 0o, then displays all four forms together.
Yes. Conversion uses BigInt, so whole-number values larger than JavaScript's safe Number range keep their exact digits.
Yes. Add a leading minus sign before the decimal digits or base prefix, such as -42 or -0x2A.
No. Number Base Converter treats the input as one integer. Use Hex Encoder & Decoder when hexadecimal pairs represent UTF-8 bytes or text data.
Looking for broader references? Browse all developer guides.