What this converter does
This Number Base Converter converts signed integers between the four most common number systems:
- Decimal (base 10)
- Binary (base 2)
- Octal (base 8)
- Hexadecimal (base 16)
It’s built for math-style integers (including very large values), not for text encoding or byte decoding.
How to use it
- Pick your Input base (Decimal / Binary / Octal / Hex).
- Type or paste a number in the left box.
- Pick your Output base.
- Copy the converted result from the right box.
Helpful switches
- Batch by newline — convert one value per line
- Trim lines — removes extra whitespace on each line (best for pasted lists)
- Uppercase hex — outputs
A–Finstead ofa–f
Nice detail: in batch mode, each line is processed independently, so one invalid line won’t stop the rest.
Input rules (so you don’t get surprises)
Signed values
You can use:
-for negative numbers (e.g.-42,-101010)+for explicit positive numbers (e.g.+42)
Optional prefixes
Prefixes are accepted when they match your selected input base:
- Binary:
0b1010 - Octal:
0o755 - Hex:
0xFF
Separators are ignored
Spaces and underscores are ignored, so all of these work:
1111_00000xFF FF1 000 000
Examples
Decimal → Binary
-42 → -101010
Hex → Decimal
0xFF → 255
Binary → Hex
10101101 → AD
Octal → Decimal
0755 (or 0o755) → 493
Batch mode: convert lists quickly
Enable Batch by newline and paste one value per line:
Input (Binary):
1010
11110000
-1001
2
Output (Decimal):
10
240
-9
!ERROR: Binary input may contain only 0 and 1
That last row fails, but the others still convert.
Common use cases
- Converting IDs between hex and decimal
- Working with bitmasks (binary ↔ hex)
- Debugging or reading octal file permissions (octal ↔ decimal)
- Learning how number bases work
- Converting large integers safely (no floating-point rounding)
Troubleshooting
“Invalid digit for base…”
This means the input contains characters that don’t exist in the selected base:
- Binary allows only 0 and 1
- Octal allows 0–7
- Decimal allows 0–9
- Hex allows 0–9 and A–F
Fix it by either changing the input base, or removing the invalid digits.
“It converts some lines but not others”
That’s expected in batch mode: each line is handled separately so your valid rows still convert.
“My hex output is lowercase / uppercase”
Use the Uppercase hex toggle to control a–f vs A–F.
Tips
- If you frequently paste hex values, keep Uppercase hex on for a more “engineering-style” output.
- For binary readability, you can paste grouped bits like 1010_1100_1111 — separators are ignored.
- For consistent results in batch mode, enable Trim lines when pasting from spreadsheets or documents.