Base-N Number Converter
Convert between binary, octal, decimal and hexadecimal, plus any base from 2 to 36. See your value listed in every common base at once.
Input
Result
Representation in Base 2 (binary)
11111111
Input: Base 10 (decimal) (decimal 255)
Base 2 (binary)
11111111
Base 8 (octal)
377
Base 10 (decimal)
255
Base 16 (hexadecimal)
ff
| Base | Prefix | Representation |
|---|---|---|
| Base 2 | 0b | 11111111 |
| Base 8 | 0o | 377 |
| Base 10 | — | 255 |
| Base 16 | 0x | ff |
How it works
- Pick an input base and an output base, then enter the number to convert. Along with the representation in your chosen base, you also see the binary, octal, decimal and hexadecimal values at the same time.
- For bases above 16, digits from 10 upward are written with letters (a-z). Input accepts either uppercase or lowercase, and results are shown in lowercase.
- Add a minus sign in front to treat the value as negative; the sign is carried into the result. When the value is 0 no sign is shown.
- To make long numbers easier to read, you may include underscores (_), commas (,) or spaces in the input. They are stripped automatically before calculation.
- Decimals and exponential notation are not supported; enter integers only. If you type a digit that does not belong to the selected base, an error is shown.
- Calculations use arbitrary-precision integers internally, so even very large numbers that would lose accuracy on an ordinary calculator are converted correctly.
Related calculators
Flash Shooting Distance
HobbyCalculate the ideal shooting distance to your subject from a flash unit's guide number, aperture and ISO.
Open calculator →Flash Aperture Calculator
HobbyCalculate the correct f-stop for flash photography from guide number, distance, and ISO. Instantly see the nearest standard f-stop and the correct distance for each aperture.
Open calculator →Lens Focal Length Calculator
HobbyEstimate the lens focal length (mm) and 35mm equivalent you need from your subject distance, real size, and sensor width.
Open calculator →Camera Angle of View Calculator
HobbyEnter a lens focal length and image sensor size to instantly calculate how wide a scene the camera captures: the horizontal, vertical, and diagonal angle of view. Includes presets for full frame, APS-C, Micro Four Thirds and more (plus custom sensor sizes) and shows the 35mm equivalent focal length too.
Open calculator →