inyourbrowser.com

Number base converter

Number base converter is a browser-based developer tool for converting values between binary, octal, decimal, and hexadecimal simultaneously. Enter any number in any base and see all four representations update instantly.

BIN
OCT
DEC
HEX

INPUT BASE

All bases shown simultaneously.

Runs entirely in your browser

How to convert between number bases

  1. Enter a number in the input field and select its current base (binary, octal, decimal, or hexadecimal).
  2. The tool converts it to all other bases simultaneously.
  3. Click any output value to copy it to your clipboard.
  4. Use the bit width selector to control representation for binary output.

Common uses

  • Converting hexadecimal colour codes or memory addresses to decimal, use color converter when you need to translate HEX to RGB or HSL for CSS
  • Working with binary, octal, and hex values in low-level programming or networking. The CIDR calculator is useful for subnet mask and address calculations
  • Converting between number bases for computer science coursework or exercises

Technical specification

  • Algorithm or formula: Standard radix conversion using positional notation. Conversion goes through a BigInt intermediate so values beyond 2^53 stay precise.
  • Browser API or library: Native JavaScript BigInt, parseInt, and Number.prototype.toString. No external library.
  • Input limits: Arbitrary precision (BigInt). Negative decimals support two's-complement view with selectable 8, 16, 32, or 64 bit width.
  • Output: Plain text representations in binary, octal, decimal, and hexadecimal, copyable per-field.
  • Known limitations: Fractional values are truncated (integer-only). Non-standard bases (e.g. base 3, 36) are not exposed.

Frequently asked questions

What bases does the tool support?
The tool converts between binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16): the four most common number bases in computing.
Is my data sent to a server?
No. All conversions are pure JavaScript calculations in your browser.
Can I convert negative numbers?
Yes. Enter a negative decimal value and the tool shows the two's complement binary representation for signed integers.
Is there a size limit for the numbers?
The tool uses JavaScript's BigInt for large number support, so you can convert numbers beyond the standard 64-bit integer limit.

Reviewed and tested May 26, 2026.