Number Systems Converter

Convert numbers between binary, decimal, octal, hex, and any base 2–36 with clean, copy-ready output.

Number Systems Converter

Convert values between binary, octal, decimal, hex, and any base 2–36.

Tips: You can use prefixes like 0b, 0o, 0x, and separators like spaces or underscores.
Allowed digits: 0–9 and A–Z (for bases above 10). Negative values are supported with a leading minus sign.
Processing…
No output yet
Enter a value, pick bases, then click Convert.
Copied

About Number Systems Converter

Number Systems Converter Online for Binary, Decimal, Octal, and Hex

A number base converter helps you translate the same value between different number systems—like binary (base 2), decimal (base 10), octal (base 8), and hexadecimal (base 16). This online Number Systems Converter is built for fast, copy-ready results with optional prefixes and digit grouping, so you can move smoothly between human-friendly and machine-friendly representations.

How the Number Systems Converter Works

Every positional number system represents a value using digits multiplied by powers of a base. For example, decimal uses powers of 10, while binary uses powers of 2. If you write the decimal number 507, it means 5×10² + 0×10¹ + 7×10⁰. If you write the binary number 101101, it means 1×2⁵ + 0×2⁴ + 1×2³ + 1×2² + 0×2¹ + 1×2⁰. The value is the same idea—only the base changes.

This tool reads your input as digits in the chosen “from base”, validates that every digit is legal for that base, then performs an exact base conversion to produce the equivalent representation in the “to base”. Internally, the conversion is performed using string-safe math so the result remains accurate even when the input is longer than what typical 32-bit or 64-bit integers can hold.

After conversion, the tool can apply formatting rules that match real-world usage: uppercase A–Z digits for bases above 10, optional code-style prefixes, and underscore grouping to make long sequences readable. You can keep formatting on while you verify correctness, then turn it off for strict exports.

Step-by-Step Conversion

  • 1) Enter a value: Paste or type a number such as 101101, 755, 12345, or 0x2F3A. You may include underscores or spaces for readability.
  • 2) Choose the input base: Select binary, octal, decimal, hex, base 36, or “Custom”. If you pick “Auto detect”, the tool uses common prefixes (0b, 0o, 0x) and character patterns to infer the base.
  • 3) Choose the output base: Select the base you want to convert to. You can also use a custom base from 2 to 36 for less common encodings.
  • 4) Set formatting options: Turn on uppercase letters for A–Z digits, add standard prefixes where they make sense, and group digits with underscores to improve readability.
  • 5) Convert and copy: Click Convert to generate the result. Use one-click copy or download to move the output into code, documentation, or a spreadsheet.

If you like to sanity-check results, try converting a hex value like 0xFF (255 in decimal) or a binary value like 10000000 (128 in decimal). Seeing familiar equivalences helps you quickly confirm that your base selections and input formatting are correct.

Key Features

Convert between any bases from 2 to 36

Beyond the classic binary/decimal/hex set, base conversion is useful for compact IDs, short links, and encoding schemes. This converter supports all bases from 2 to 36, meaning you can use digits 0–9 and letters A–Z. If you need base 32 or base 36 for URL-friendly identifiers, you can set a custom base and convert instantly.

Working with higher bases can reduce string length dramatically. For example, a long decimal identifier may become shorter in base 36 while staying copy-safe for emails and URLs. When you need to store or transmit numeric identifiers in a compact form, converting to an alphanumeric base is a simple and effective technique.

Auto-detect common prefixes

In developer workflows, values are often written with prefixes such as 0x for hexadecimal, 0b for binary, or 0o for octal. When you enable auto-detection, the tool will recognize these prefixes and convert correctly without requiring you to manually switch the “from base” each time. This is handy when debugging logs, reading mixed-format documentation, or reviewing output from multiple command-line utilities.

Auto-detection is intentionally conservative: prefixes win when present, then the tool falls back to common character patterns. If you know the exact base, selecting it explicitly always removes ambiguity—especially for values that could be valid in multiple bases (for example, 1010 can be binary or decimal).

Validation that matches the base you chose

Base conversion only works when every character is valid for the source base. For example, the digit 8 is not valid in octal, and the letter G is not valid in hexadecimal. The converter checks your input against the active base, provides clear error messages, and keeps your original text so you can correct it quickly.

Validation is also helpful when you copy values from sources that include formatting. Underscores, spaces, and common prefixes are handled so you can paste values directly without manual cleanup. If the tool rejects an input, it’s a signal that the value likely contains an invalid digit for the selected base.

Readable formatting: grouping, case, and prefixes

Human-friendly formatting reduces mistakes. Grouping digits with underscores makes long binary and hex strings easier to scan, while uppercase digits keep output consistent in codebases that enforce style rules. Optional prefixes (0b, 0o, 0x) help prevent ambiguity when you paste values into a snippet or share them with teammates.

Grouping is applied from the right so the least-significant digits line up naturally. Common group sizes are used: binary groups of four bits, octal groups of three digits, decimal groups of three digits, and hex groups of two digits (one byte). You can switch grouping off to produce “pure” strings for strict parsers.

Quick conversions panel for binary, octal, decimal, and hex

Even when you choose a custom “to base”, you often still want standard representations for comparison. The result panel includes quick conversions to bases 2, 8, 10, and 16 with their own copy buttons, making it easy to validate that the value is correct and to pick the most practical representation for the task at hand.

This panel is particularly useful when you’re learning. Converting the same value into several bases helps you spot patterns, like how hex aligns with bytes or how octal groups correspond to three-bit chunks. Those patterns make future mental conversions faster.

Use Cases

  • Programming and debugging: Convert between decimal IDs and hex addresses, check bit masks, and compare output from tools that display values in different bases.
  • Networking and systems work: Translate between binary subnet masks, dotted decimal concepts, and hex representations used in low-level diagnostics.
  • Embedded and hardware projects: Work with registers, flags, and sensor values that are typically expressed in hex or binary while still needing decimal values for calculations.
  • Computer science education: Practice base conversions, verify exercises, and explore how positional notation changes as the base changes.
  • Data encoding and identifiers: Convert large numbers into base 36 or other compact formats to create shorter tokens for URLs, product codes, or internal references.
  • Documentation and technical writing: Create consistent examples for tutorials and API docs by converting once and then copying all common formats.
  • Security and reverse engineering: Interpret hex dumps, offsets, and signatures by converting values into the representation you need for analysis.

In practice, base conversion is less about “math tricks” and more about reducing friction between tools. When a log line prints a hex value but your mental model is decimal—or when you need a bit pattern to confirm a mask—fast conversions prevent errors and keep you moving.

Base conversion also helps in collaboration. Different teams and documentation styles may prefer different representations (for example, firmware engineers may prefer hex while analysts prefer decimal). Being able to translate quickly reduces misunderstandings and keeps bug reports and tickets precise.

Optimization Tips

Use the base that matches your intent

Binary is best for flags and bit-level reasoning, hex is best for compact readability of bytes and words, and decimal is best for everyday counting and arithmetic. If you are working with bytes, hex often provides the clearest mapping: two hex digits represent one byte. For bit masks, binary makes set/unset bits immediately visible. Pick the base that reduces cognitive load for the problem you are solving.

Keep readability features on while working, then turn them off when exporting

Grouping and prefixes help during analysis, but some environments require strict formats without separators. A practical workflow is to convert with grouping enabled while you validate correctness, then disable grouping before you paste the final value into a compiler, configuration file, or strict parser. Similarly, prefixes are excellent for code snippets but may be undesirable in spreadsheets or plain reports.

Be mindful of leading zeros and sign conventions

Many technical contexts treat leading zeros as meaningful—for example, fixed-width binary fields, byte-aligned hex, or identifiers padded to a particular length. This converter focuses on the numeric value, which means leading zeros may be removed in the output. If you need a fixed width, add padding after conversion based on your target size (for example, 8 hex digits for a 32-bit value). For negative values, remember that two’s complement representation depends on a fixed bit width, so choose a width before interpreting signed binary or hex as a negative number.

When you are dealing with bit widths, a simple habit is to write down the expected size first: 8-bit, 16-bit, 32-bit, or 64-bit. Then format your output to match that width. This prevents common errors such as forgetting a leading zero nibble in hex or misreading an 8-bit mask as a 16-bit field.

FAQ

It supports any base from 2 to 36. That includes the common developer bases—2 (binary), 8 (octal), 10 (decimal), 16 (hex)—plus bases like 32 and 36 for compact alphanumeric encodings.

Yes. If you choose “Auto detect”, the tool recognizes common prefixes and converts accordingly. If you select a specific base, it will also ignore a matching prefix (for example, 0x when converting from hex). This makes it easy to copy directly from source code, logs, or documentation.

A leading minus sign is preserved and applied to the converted output. If you need two’s complement output for a fixed bit width, convert the magnitude first and then apply your chosen width and complement rules based on your environment. Two’s complement always depends on an agreed width.

Underscores are an optional readability feature that groups digits from the right (for example, binary in groups of four and decimal in groups of three). Many programming languages accept underscores in numeric literals, but not all parsers do—so you can turn grouping off when you need a strict value.

Yes. The conversion logic operates on strings instead of relying on floating-point math, so it can handle long inputs within the tool’s configured character limit. Extremely long values may take longer to process, so keep inputs as small as your use case allows and prefer compact bases when appropriate.

Why Choose This Number Systems Converter?

This tool is designed for practical workflows: predictable validation, clean copy-ready output, and a layout that keeps settings and results visible at the same time. Whether you’re interpreting a hex address, verifying a bit mask, or creating compact base-36 identifiers, you can convert quickly without switching between multiple calculators or IDE helpers.

Because the converter focuses on correctness and clarity, you can trust it as a daily companion for development, learning, and documentation. Start with auto-detection for quick pastes, fine-tune formatting for readability, and export the result in the exact base you need—then copy it into your project with confidence.

If you routinely work with multiple representations, the biggest gain is consistency. A single converter that accepts common prefixes, rejects invalid digits, and presents outputs in a predictable format reduces the chance of subtle mistakes. That reliability is exactly what you want when values are driving configuration, addressing, permission masks, or any other detail where a single incorrect digit can cause hours of debugging.