snaptxt.app

Number Base Converter

Convert numbers between binary, octal, decimal, and hexadecimal — instantly in your browser.

Type a decimal number above to see all conversions.

How to use it

  1. 1Type a number into any of the four fields — Binary, Octal, Decimal, or Hexadecimal.
  2. 2All other fields update instantly to show the same value in their respective base.
  3. 3The Bit length row below shows how many bits are needed to represent the number in binary.
  4. 4Prefixes (0b, 0o, 0x) are stripped automatically, so you can paste a prefixed value and it will still parse correctly.

Common use cases

  • Decode a hexadecimal color or memory address into its decimal equivalent for debugging.
  • Convert a decimal permission mask into binary or octal to understand Unix file permissions (e.g. 755).
  • Cross-check a binary value you're hand-writing in an embedded systems project against its hex equivalent.
  • Teach or learn binary arithmetic — watch how incrementing in decimal affects the binary representation.
  • Convert a hex API response field into decimal for human-readable comparison.

Frequently asked questions

Does it handle hexadecimal letters?
Yes. The hex field accepts both uppercase (A–F) and lowercase (a–f). The output is always shown in uppercase for readability.
What's the largest number it can convert?
JavaScript's safe integer range — up to 2^53 − 1 (9,007,199,254,740,991 in decimal). For most practical purposes this is more than enough; very large cryptographic values would require a big-integer library.
Can I enter a negative number?
No — negative numbers and two's-complement representation are not supported. The tool converts non-negative integers only.
Why does the bit-length change as the number grows?
Bit length is the number of binary digits needed to represent the value — i.e. the length of the binary string without leading zeros. 1 needs 1 bit; 4 needs 3 bits; 255 needs 8 bits. It tells you the minimum word size to store that value.
Is anything sent to a server?
No. Conversion runs in your browser using JavaScript's built-in parseInt and Number.prototype.toString with a radix. Nothing leaves your device.