Number Base Converter

Convert numbers between binary, octal, decimal and hexadecimal instantly. Free, in your browser.

Conversions
Binary11111111
Octal377
Decimal255
HexadecimalFF

Convert between binary, octal, decimal and hexadecimal. Runs in your browser.

Free to use — premium coming soon

FREE
  • Bin/oct/dec/hex
  • Live & validated
  • 100% private
PREMIUM
  • Remove ads
  • Arbitrary bases & bitwise tools

About the Number Base Converter

The Number Base Converter translates a value between the four bases that show up everywhere in computing: binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16). Type a number in one base and the tool reads it as a positional value, then re-expresses that same quantity using the digit set of each target base. Binary uses only 0 and 1, octal uses 0 through 7, decimal uses 0 through 9, and hex extends the digits with A through F to stand for the values ten through fifteen. The underlying number never changes, only the notation you read it in.

Reach for this whenever you bump into a number written in an unfamiliar base. Programmers decode hex color codes like #1F883D, read memory addresses and register dumps, and check bitmask flags. System administrators convert Unix file permissions, where rwxr-xr-x maps to 755 in octal because each group of three permission bits becomes one octal digit. Students and electronics hobbyists use it to check homework on positional notation, two's-complement, or logic-circuit problems. Because hex and binary line up so neatly, the tool is also handy for debugging: a long binary string is far easier to verify once it is collapsed into a few hex digits.

Conversion works in two stages. To read a number, the tool sums each digit multiplied by its base raised to the digit's position, so binary 1101 is 1x8 + 1x4 + 0x2 + 1x1 = 13 in decimal. To write that value in another base, it divides repeatedly by the target base and records the remainders in reverse order. Between binary, octal, and hex there is a shortcut the tool exploits: one octal digit equals exactly three bits and one hex digit equals exactly four bits, so those conversions are just regrouping the binary digits rather than doing full arithmetic.

Accuracy depends entirely on the digits being valid for the base you select, so the tool only accepts characters that legitimately belong to that base; a stray 9 in a binary field or a G in a hex field is rejected rather than silently misread. Everything runs in your browser using JavaScript, so the numbers you enter are never uploaded to a server or stored. For everyday integers the results are exact. Be aware that extremely large values can exceed the precision limit of standard JavaScript numbers, and that fractional or signed two's-complement values follow their own rules beyond plain whole-number conversion.

Frequently asked questions

Why does hexadecimal use letters like A to F?

Base 16 needs sixteen distinct symbols for one digit, but we only have ten numerals (0 to 9). The letters A through F fill the gap, representing the values ten through fifteen, so a single hex digit can stand for any value from 0 to 15.

How do binary and hexadecimal relate to each other?

Every hexadecimal digit corresponds to exactly four binary digits (a nibble), because 16 equals 2 to the fourth power. That means a full byte is always exactly two hex digits, which is why hex is used as a compact shorthand for binary in code and memory dumps.

How do I convert a decimal number to binary by hand?

Divide the number by 2 repeatedly, writing down each remainder, until the quotient reaches 0. Then read the remainders from bottom to top. For example, 13 gives remainders 1, 0, 1, 1 which read in reverse is 1101.

Why is octal used for Unix file permissions?

Each permission group (owner, group, others) has three flags: read, write, and execute. Three bits map perfectly to one octal digit because 2 cubed is 8, so rwxr-xr-x compresses cleanly to 755.

Is there a limit to how large a number I can convert?

For ordinary integers the conversion is exact. Very large values may exceed the precision of standard JavaScript numbers, so for huge inputs treat the result as approximate or split the value into smaller chunks.

From our blog

From JSON to YAML Without Breaking Your Config: A Practical Guide

By the Super Simple Digital Tools Team · Updated June 2026

JSON and YAML are two ways of writing the same thing. Under the hood both encode a tree of mappings (key-value pairs), sequences (lists), and scalar values like strings, numbers, booleans and null. That shared model is why conversion is reliable: there is no information in well-formed JSON that YAML cannot represent. What changes is the surface syntax. JSON marks structure with braces, brackets, commas and quotes; YAML marks it with indentation and dashes. Strip the punctuation, indent consistently, and a dense JSON object becomes a YAML file you can scan top to bottom like a checklist.

So why bother, if a system accepts both? Because YAML won the configuration ecosystem. Kubernetes manifests, Helm charts, Docker Compose, GitHub Actions and GitLab CI pipelines, and Ansible playbooks are all written in YAML by convention. The big reasons are human ones: YAML files have less syntactic noise, nest more readably, and crucially support comments, something JSON flatly refuses. When a deployment file is edited by people during incidents, being able to annotate why a value is set the way it is matters more than raw parsing speed. JSON still dominates APIs and machine-to-machine data exchange, which is exactly where the conversion need arises.

The single biggest gotcha in YAML is indentation, because indentation is not cosmetic, it is the structure. There are no closing braces to fall back on, so one extra or missing space can silently move a key to the wrong nesting level or invalidate the file. The cardinal rule: never use tabs. The YAML spec forbids tab characters for indentation, and mixing tabs with spaces, often introduced by copy-pasting from a terminal or documentation, is one of the fastest ways to produce a file that looks fine but won't parse. Pick two spaces per level and stay consistent throughout.

The second classic trap is implicit typing. YAML tries to infer whether a bare value is a string, number or boolean. Under the still-common YAML 1.1 rules, words like yes, no, on, off, true and false (in many capitalisations) all become booleans, which is how the Norway problem got its name: the country code NO parses as the boolean false. Leading-zero values like 0755 or version-looking strings can also be coerced unexpectedly. The fix is simple and is why a good converter quotes proactively: wrap any value whose textual meaning matters in quotes so the parser treats it as a literal string.

A sensible workflow, then, is convert, scan, validate. Convert the JSON to get clean block-style YAML. Scan the output for any values that should be strings but were left bare, and confirm the indentation depth matches where the snippet will live in a larger file. Then run it through a YAML linter or the target tool's dry-run mode before committing. Because the conversion is lossless, anything that breaks afterwards is almost always one of the two YAML-specific issues, indentation or implicit typing, not the data itself.

  • Use two spaces per indentation level and never tabs; configure your editor to insert spaces on Tab so pasted YAML stays parseable.
  • After converting, check that values like NO, yes, off, or numbers with leading zeros are quoted if you meant them as strings, to dodge YAML's implicit-typing traps.
  • When pasting converted YAML into a Kubernetes or CI file, re-indent the whole block so its top level lines up with its parent key rather than the file's left margin.
  • Run the output through a YAML linter or your tool's dry-run (for example kubectl apply --dry-run) before committing, since YAML errors often hide in invisible whitespace.

Read the full guide →

Tool by the Super Simple Digital Tools Team. Reviewed by our editorial team. Free to use, no signup required.

Related tools