§

Options

§

Binary (base 2)

§

Octal (base 8)

§

Decimal (base 10)

§

Hexadecimal (base 16)

§

Custom base

US computer science programs lean on number base conversion every semester. IEEE 754 single-precision floats appear on CS101 finals, where students have to read a 32-bit pattern off the page and decompose it into sign, exponent, and mantissa fields. NIST IR 8366 documents the hex notation conventions for cryptographic key material that FedRAMP auditors expect to see in evidence packages. UK penetration testers writing CHECK-scheme reports follow the same hex-grouping habit when annotating bit-flag misuse against syscall masks. This converter handles the mechanical part so engineers spend their time on the interpretation, not the arithmetic.

How base conversion works

Every positional numeral system represents a value as a sum of digits multiplied by powers of the base. Switching bases means rewriting the same value against a different power series.

  1. Validate the input alphabet. Each base accepts a specific digit set. Binary accepts 0 and 1; octal accepts 0-7; decimal accepts 0-9; hex accepts 0-9 and A-F. A character outside the chosen alphabet surfaces an inline error before any conversion runs.
  2. Parse the value. For values that fit in a JavaScript Number (up to 2^53-1) the tool calls parseInt(text, base). Above that boundary it falls back to BigInt so the conversion stays exact for arbitrarily large integers.
  3. Re-render in every target base. The parsed value is converted to each output base via Number.prototype.toString(base) or BigInt.prototype.toString(base). The four standard panes (binary, octal, decimal, hex) and the custom-base pane update together.
  4. Apply formatting. A prefix toggle adds 0b, 0o, or 0x to the front of binary, octal, and hex output. Digit grouping inserts an underscore every four binary digits and every two hex digits. A hex case toggle picks uppercase or lowercase letters for A-F.
  5. Live cross-pane sync. Editing any pane triggers a 100 ms debounced re-conversion that updates the other panes. The pane you are typing in is treated as the source of truth on each keystroke.

Why use a base converter

  • Reading memory dumps. Debuggers, disassemblers, and core-dump viewers show addresses and register values in hex. Translating those into decimal makes them comparable to counts, sizes, and offsets reported elsewhere in the same trace.
  • Working with color codes. CSS, design tools, and image formats spell colors in hex triplets like #d2511a. Converting each pair to decimal turns the same color into the rgb(210, 81, 26) form your color picker or accessibility checker expects.
  • Decoding file permissions. Unix chmod values are written in octal: 755 means rwxr-xr-x once you translate each octal digit into its three binary bits. The converter shows that mapping in one step so you can check a permission set without reaching for a man page.
  • Debugging bit flags. Network protocols, kernel syscalls, and hardware registers pack many boolean flags into a single integer. Reading the integer in binary shows which bits are set at a glance, which is what you need when chasing why a flag isn't taking effect.

Common applications

Base conversion shows up in day-to-day developer, security, and hardware work whenever a number is more than just a count.

  • Embedded firmware: read a hex dump from a JTAG probe, find the address of a function, and write a breakpoint command using the decimal offset your debugger script accepts.
  • Network security: parse a 32-bit netmask printed in dotted-decimal back into binary to count the prefix length, then write the CIDR form for an ACL rule.
  • CTF puzzles and crypto challenges: flip between hex, decimal, and binary while comparing a leaked key fragment against a candidate plaintext under XOR.

A worked example

Type 255 into the decimal pane. The hex pane updates to FF (or 0xFF with the prefix toggle on), the binary pane to 11111111 (grouped as 1111_1111), and the octal pane to 377. Switch the custom-pane radix to 36 and the same value renders as 73. Type a much larger value such as 123456789012345678901234567890 into the decimal pane; the hex pane uses the BigInt path and renders 18EE90FF6C373E0EE4E3F0AD2.

FAQ

What is a number base?

A number base, or radix, is how many distinct digits a positional system uses before it carries into the next position. Decimal (base 10) uses 0-9; binary (base 2) uses just 0 and 1; hexadecimal (base 16) uses 0-9 plus A-F. The value of a number does not change when you switch bases — only the way its digits are written and grouped.

Why use hexadecimal in programming?

One hex digit maps to exactly four binary bits, so two hex digits cover a byte and eight hex digits cover a 32-bit word. That makes hex the most compact human-readable form for memory addresses, register contents, color triplets, and cryptographic keys. Reading 0xFF is faster than reading 11111111, and the bit pattern is right there if you need it.

Can I convert beyond base 36?

This tool stops at base 36 because that is the upper limit of the native JavaScript parseInt and toString APIs, which accept 0-9 followed by A-Z as the digit alphabet. Bases 37-62 are possible with a custom alphabet (Base58 used in Bitcoin addresses is one example) but they are tracked as a separate tool because each higher base needs its own canonical digit ordering.

Does this handle negative numbers and floats?

Negative integers are rendered with a leading minus sign in every base, the same behaviour Number.prototype.toString ships with. Two's-complement representation across a chosen bit width (8, 16, 32, 64) is a separate view we plan to add. Floating-point base conversion is also out of scope for this version; the tool handles integer values only.

Base conversion is a small job that comes up over and over in firmware, security, and graphics work. Doing it in a browser tab, with the same arithmetic primitives Node and V8 already ship, keeps the work fast and the data on your machine.