Convert between decimal, hex, binary and octal

For students, developers and technicians checking a value across several notations, Base Converter avoids manual arithmetic.

Convert a value between decimal, hexadecimal, binary and octal notation without doing the conversions by hand. No upload or storage is involved.

How to use

  1. Enter the value to convert, either in decimal or with a prefix such as 0x, 0b or 0o.
  2. Choose the specific conversion you need, or use the option that shows all available bases.
  3. Run the conversion to get decimal, hexadecimal, binary and octal renderings.
  4. Review the outputs and pick the base required by your code or documentation.
  5. Copy the useful value and check that it still matches the original number.

Example

With 42 as the input, run the conversion and look at the different notations of the same number. Then try a prefixed value such as 0x2a to confirm that the tool recognises the base you intended.

Input

42

Limits and formats

Where processing happens

The conversion runs locally in your browser. The value you type does not leave the page and is not stored by the tool. That lets you convert several numbers in sequence without an account or an upload.

Frequently asked questions

How do I tell the tool which base I am using?

For hexadecimal, use the 0x prefix; for binary, use 0b; and for octal, use 0o. Without a prefix, the tool generally treats the input as decimal. These markers prevent confusion between similar-looking notations.

Can I convert a negative number?

You can try, but negative representation depends on the convention in use, especially for binary and hexadecimal. Check the answer in your programming environment when the sign and memory width are important.

Are the results ready for source code?

They provide a useful mapping, but paste the value into your project carefully. Depending on the language, integer size and signedness can affect interpretation. Testing in your editor is still the safest step.

Tools in the same category