ForHosting KIT · Developer Utilities

Senary base-6 converter

42 is 110 in base 6, the senary system with digits 0 to 5 and places worth 1, 6, 36 and 216, the radix of six-sided dice and place-value lessons. Convert whole numbers from decimal to senary and back. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Value
42
Direction
To senary
You get
Result
110
Decimal
42
Senary
110
Alphabet
012345

A senary converter rewrites a non-negative whole number between everyday base-10 and base-6, the radix-six system also called senary or heximal. The six digit symbols are simply zero through five—no letter digits—so every place value is a power of six, matching six-sided dice faces, some traditional counting schemes, and recreational number-system lessons. You choose a direction—decimal to senary or senary back to decimal—enter the value, and receive a deterministic result with the cleaned decimal integer, the base-6 string, the digit count, and the fixed alphabet. Any character outside 0–5 fails with a clear invalid-input error instead of a silent wrong answer.

How senary (base-6) encoding and decoding work

Senary is positional notation with radix six. Each place is a power of six, just as decimal places are powers of ten: the units place is six to the zero, the next place is six, then thirty-six, then two hundred sixteen, then one thousand two hundred ninety-six, and so on. The six digit symbols used here are zero through five for values zero through five—there are no letter digits, because base six never needs a symbol past five.

That pure digit alphabet matches dice-face notation, elementary place-value drills, and programming exercises that treat six as a clean teaching radix before hex or base sixty-two. To encode a non-negative decimal integer, divide repeatedly by six and record each remainder as the next least-significant digit; reverse those remainders to obtain the usual left-to-right string without leading zeros except for the number zero itself. To decode, walk the string from left to right, multiply the running total by six, and add the digit value of the next character—the classic Horner scheme.

An invalid character such as a space, plus sign, the digit six, seven, eight, nine, a letter, or punctuation aborts with invalid input naming the bad character and its position. Values must stay inside JavaScript’s safe integer range so every digit remains exact when the result is serialized. Negative inputs are rejected on purpose; the senary alphabet has no sign digit, and signed base-6 is a separate convention.

If you need arbitrary bases from two through thirty-six with letter digits A through Z, that is a different search intent served by a general radix converter rather than this senary-specific landing.

Where senary converters show up in real work

Mathematics education and history-of-numeration courses introduce base six because it sits between binary and decimal, has only six symbols, and maps naturally onto a standard six-sided die whose faces already show one through six in decimal labels but can be remapped to place-value exercises in radix six. Tabletop game designers, RPG tool authors, and probability teachers who work with d6 dice often need a shared oracle that converts pile totals and inventory counts into pure 0–5 digit strings for homebrew number systems, alien calendars, or dice-coded puzzles.

Recreational mathematicians and puzzle authors publish tables that stay inside digits zero through five and need deterministic conversion for answer keys. Treat general multi-base radix tables that stop at thirty-six with A through Z, pure hexadecimal dumps, binary-only converters, octal converters, duodecimal with dek and el, and Base64 byte encoding as separate search intents with their own landings rather than stretching this integer senary converter past its honest scope.

Classroom base-6 place-value drills

Convert homework integers between base-10 and base-6 with digits 0–5 only so answer keys match senary teaching materials and dice-face analogies.

Dice notation and RPG number systems

Map inventory counts, calendar ticks, and puzzle codes into pure base-6 strings for d6-themed games and lore tools without hand-encoding digits.

What alphabet does this senary converter use?

The six characters 0, 1, 2, 3, 4, and 5 only. There are no letter digits. Any character outside that set—including 6–9, letters, and punctuation—is rejected as invalid input.

What happens on an invalid senary digit?

The message names the bad character and its position. Only digits 0–5 are allowed; spaces, signs, letters, and digits 6–9 are rejected.

Is this the same as a general radix converter, binary, or hex?

No. General radix tools typically use A–Z for digits ten and up and stop at base 36. Binary is base 2; hexadecimal is base 16 with A–F. This page is dedicated to base-6 (senary) with digits 0–5.

What does it cost?

The browser tool is free and runs locally.

How do I convert a decimal number to base 6 by hand?

Divide by 6 again and again and note each remainder, from 0 to 5, then read them from last to first. 42 gives 110, because 42 is one 36, one 6 and no units.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/enc/base-senary

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/enc/base-senary \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"value":"42","direction":"to_senary"}'
{
  "value": "42",
  "direction": "to_senary"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "enc.base_senary",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

max_abs9007199254740991
max_senary_chars22
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Pricing for successful API calls is the published base of $0.002 per item.

How senary (base-6) encoding and decoding work

The algorithm uses exact integer arithmetic only: no floating-point rounding, no random seeds, no wall-clock timestamps, and no network calls, so identical inputs always produce identical JSON.

What you send and what you get back

Send two required fields: value and direction. Absolute decimal values larger than Number.MAX_SAFE_INTEGER are rejected so low-order digits cannot silently disappear; senary strings longer than twenty-two characters are likewise rejected. Classic checks include forty-two encoding to one-one-zero in base six, six encoding to ten, thirty-six encoding to one hundred, and decoding two-one-five back to eighty-three. Direction must be to_senary when value is a non-negative decimal integer, or from_senary when value is a base-6 string. Aliases are accepted so forms and scripts can use the names that fit their UI: value also accepts n, number, input, text, decimal, senary, and base6; direction also accepts dir, mode, and op, plus short synonyms such as to, from, encode, decode, to_base6, from_base6, decimal_to_senary, and senary_to_decimal. For to_senary, value may be a JSON integer or a digit string with an optional leading plus; fractions, scientific notation, bare words, NaN, Infinity, and negatives fail with invalid_input and are not charged. For from_senary, every character must belong to the alphabet zero through five; any other character—including six through nine, letters, underscore, hyphen, and space—fails with a message that names the invalid senary digit and its zero-based position. On success the response echoes the cleaned value string, the normalized direction, decimal as a number, senary as the compact base-6 string, result as the primary converted form (senary when encoding, decimal string when decoding), the full alphabet string 012345, base set to six, and digit_count for the senary representation. Pricing for successful API calls is the published base of $0.002 per item; validation failures do not consume prepaid balance.

Where senary converters show up in real work

Because this capability is a pure parse engine, API pricing is the published base of $0.002 per successful item and failed validation does not consume balance.

Senary tables and unit-test fixtures

Generate deterministic decimal ↔ senary pairs for recreational math tables, puzzle keys, and golden tests for multi-base UI components.

How do I choose the direction?

Use to_senary when value is a non-negative decimal integer and you want a base-6 string. Use from_senary when value is already senary and you want the decimal integer back.

Read the full KIT documentation →