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

JSON to CSV Without Losing Data: Flattening, Encoding, and Excel Traps

By the Super Simple Digital Tools Team · Updated June 2026

Most JSON to CSV problems are not really about JSON or CSV; they are about the gap between a flexible tree and a rigid grid. JSON can nest objects inside objects and arrays inside arrays to any depth, while CSV is a flat table of rows and columns. The conversion succeeds when your data is already list-shaped, an array of records that all describe the same kind of thing, and gets awkward only when a single record fans out into sub-lists. Knowing that distinction up front tells you whether you should convert at all or keep the data as JSON.

The first real decision is how to flatten. A nested object usually maps cleanly to dotted columns: {"user":{"id":1,"city":"Oslo"}} becomes user.id and user.city, one value each, no information lost. Arrays need more thought. An array of primitives like ["red","blue"] reads best joined into one cell, because the items belong together as a set. An array of objects, such as invoice line items, carries independent meaning per item, so you either expand them into numbered columns or split the record into multiple rows. Picking the wrong strategy is the most common cause of a CSV that technically converts but is unusable.

Headers come from the union of keys, not just the first object. If one record has an email field and the next does not, the converter still creates an email column and leaves the missing cell empty so every row has the same width. This matters with API data, where optional fields appear only on some records. Relying on the first object alone would silently drop columns. Empty cells are correct here; they preserve the shape of the table and let spreadsheets and importers line up values under the right headers.

Escaping is where naive conversions fall apart. The CSV format reserves the comma as a separator, the double quote as a wrapper, and the line break as a row terminator, so any value containing one of those must be quoted, and quotes inside the value are doubled rather than backslash-escaped. A product description with a comma, an address with a newline, or a note with a quotation mark all need this treatment, or the columns shift and the file becomes garbage two rows down. A correct converter applies RFC 4180 quoting automatically so you never have to think about it.

Finally, encoding and the spreadsheet itself. Save and treat CSV as UTF-8 so accented names and non-Latin scripts survive; Excel on Windows may need a byte-order mark or an explicit import step to read UTF-8 correctly. The bigger trap is type auto-detection: opening a CSV by double-click lets Excel reinterpret your text, dropping leading zeros and rewriting long IDs as 1.23457E+15. The file is fine; the viewer is guessing. Import through the data wizard, set identifier columns to Text, and your CSV will round-trip exactly as written.

  • Wrap your input in square brackets if it is a bare list of objects; the converter needs a top-level array to produce one row per record.
  • For ZIP codes, phone numbers, and long IDs, open the CSV via Excel's Data > From Text/CSV and set those columns to Text to stop leading zeros and scientific-notation corruption.
  • Decide per array: join primitive arrays like tags into one cell, but expand arrays of objects (line items) into separate columns or rows so nothing collapses.
  • If accented or non-Latin characters look wrong after opening, the file is UTF-8 but the spreadsheet guessed the encoding; reimport and choose UTF-8 explicitly.

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