Binary Converter
Convert numbers between binary, octal, decimal, and hex.
Example
- In:
- 255 (decimal)
- Out:
- 11111111 (binary) · FF (hex) · 377 (octal)
Enter a number and convert between binary, octal, decimal, and hex.
Guide
Introduction
Computers store numbers in binary. Humans write them in decimal. Compilers accept hexadecimal literals. Unix file permissions use octal. Fluency converting between bases separates debugging a bitmask permission error in thirty seconds from staring at 755 wondering why a script won't execute.
Certoflow's Binary Converter accepts a number in any of four bases — binary, octal, decimal, or hexadecimal — and displays equivalent representations in all other bases simultaneously.
What this tool does
Select your input base, enter a value, click Convert. Output lists:
binary: 11111111
octal: 377
hex: FF
(when converting decimal 255)
No mode switching required to see all representations — essential when documentation references one base and your debugger displays another.
How it works
JavaScript parseInt(value, radix) converts input to a single integer, then toString(radix) emits each target base. Validation catches:
- Invalid digits for the selected base (e.g.,
9in octal) - Empty input
- Non-integer garbage characters
Results update synchronously in the browser.
Quick reference table
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 8 | 1000 | 10 | 8 |
| 15 | 1111 | 17 | F |
| 255 | 11111111 | 377 | FF |
| 256 | 100000000 | 400 | 100 |
Real-world examples
Unix file permissions
chmod 755 means:
- Owner: 7 =
111(rwx) - Group: 5 =
101(r-x) - Other: 5 =
101(r-x)
Convert 7 from decimal to binary to verify each permission bit.
IPv4 subnet masks
Subnet mask 255.255.255.0 → each octet converts to binary for CIDR calculations. 255 → 11111111 confirms eight network bits in that octet.
Color manipulation in graphics programming
Extract green channel from #00FF00:
FFhex → 255 decimal →11111111binary- Bitwise AND with mask isolates channel
Hardware register documentation
Datasheet states register bit 3 enables DMA. Confirm bit position by converting register default 0x0A to binary 1010 and reading bit index.
Common mistakes
Entering binary without selecting binary input base. Typing 11111111 in decimal mode parses as eleven million, not 255.
Expecting signed integer two's complement. This tool handles non-negative integers. Interpreting 11111111 as -1 requires 8-bit signed context not applied automatically.
Precision loss on huge values. JavaScript integers above 2^53 lose precision. 64-bit register values need BigInt-aware tools.
Confusing with Binary Translator. That tool maps text characters to bit strings (A → 01000001). This tool converts numeric values between bases.
Forgetting leading zeros are cosmetic in numeric value. 00001111 binary equals 1111 binary numerically — but leading zeros matter when documenting fixed-width bit fields.
Use cases
| Task | Example |
|---|---|
| chmod troubleshooting | Decimal → binary for permission bits |
| Interview prep | Convert between bases under time pressure |
| Embedded C | Verify #define hex matches expected binary |
| Network engineering | Octet decimal → binary for ACL rules |
| Game modding | Hex memory addresses → decimal for cheat engines |
Bit width awareness
When documentation specifies "16-bit value," mask results accordingly:
- 16-bit max: 65535 (decimal) =
FFFF(hex) =1111111111111111(binary)
Values exceeding the documented width indicate overflow or documentation error.
Cluster integration
After base conversion, encode ASCII protocol strings via Binary Translator. Cross-check hex output with Hex Converter when working with string-encoded hex dumps. Schedule periodic jobs discovered during bitmask audits using Cron Expression Generator.
Floating-point caveat
This tool converts integers only. IEEE 754 floating-point values (3.14, 0.1) require dedicated float bit-layout tools showing sign, exponent, and mantissa fields separately. Do not parse float literals through integer base conversion expecting meaningful results.
Permission bit reference (octal chmod)
| Octal digit | Binary | Meaning |
|---|---|---|
| 7 | 111 | rwx |
| 6 | 110 | rw- |
| 5 | 101 | r-x |
| 4 | 100 | r-- |
| 0 | 000 | --- |
Convert each chmod digit through this tool when explaining permission errors to junior developers — visual binary makes "missing execute bit" immediately obvious.
Network prefix length shortcut
CIDR /24 means 24 leading one bits in subnet mask. Convert decimal 255 to binary once, recognize eight consecutive ones, repeat for three octets — that pattern recognition speeds subnet troubleshooting during outage calls.
IPv6 addresses use hex groups — this decimal/binary tool complements but does not replace full IPv6 address calculators for 128-bit address arithmetic.
Summary
Binary Converter is the pocket reference for numeric base translation — the operation so fundamental that senior engineers forget how often juniors need it until production permission bugs appear. One input, four outputs, zero server round trips.
Frequently Asked Questions
- Can I convert negative numbers?
- This tool handles non-negative integers using JavaScript parseInt semantics. Signed two's complement conversion for fixed bit widths is a separate operation.
- What is the largest value supported?
- JavaScript safely represents integers up to 2^53 - 1. Larger values may lose precision. For 64-bit bitwise work, use language-native big integer types.
- Do I need a 0x prefix for hex input?
- No. Select Hex as the input base and enter digits like FF or 2A without a prefix.
- How is this different from Binary Translator?
- Binary Converter converts numeric values between bases. Binary Translator encodes human-readable text as sequences of bits and decodes bit strings back to characters.
- Why learn base conversion?
- Permission flags in Unix (chmod 755), IPv6 addresses, color channels, and hardware register documentation all require fluency moving between bases.
Related Tools
Continue with these related utilities.
Binary Translator
Convert text to binary and binary to text.
Developer ToolsHex Converter
Convert text, hex, and decimal in both directions.
Developer ToolsCron Expression Generator
Build and validate cron expressions visually.
Developer ToolsUUID Generator
Generate UUID v4 identifiers securely in the browser.
Developer ToolsGUID Generator
Generate random GUIDs with bulk and formatting options.