ForHosting KIT · Unit converters

Base36 encoder

255 in base 36 is 73: this converter turns whole numbers into short codes made of digits and the letters A to Z, and decodes them back to decimal. 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 to convert
255
Conversion direction
to_base36
You get
Decimal
255
Decimal string
255
Base36
73
Base36 lower
73

This base36 encoder converts an integer to a base-36 string, or a base-36 string back to a decimal integer, using the classic alphabet of digits zero through nine and letters A through Z. Base-36 is a compact positional system often used for short codes, invoice suffixes, URL tokens, and educational place-value drills where you want more density than decimal without jumping to hexadecimal or base sixty-four. There are no network calls, no random samples, and no clock-dependent shortcuts.

What base 36 means and what you get back

Base-36 is a positional integer system that uses thirty-six symbols: the decimal digits zero through nine for values zero through nine, then the letters A through Z for values ten through thirty-five. Each place multiplies its digit by a power of thirty-six, so the rightmost digit is ones, the next is thirty-sixes, then one thousand two hundred ninety-six, and so on.

Encoding a decimal whole number is the classic repeated-division process: divide the magnitude by thirty-six, record the remainder as the next least-significant digit, and continue with the quotient until it reaches zero. Decoding walks the base-36 string from left to right, multiplying the running total by thirty-six and adding each digit value. There is no floating-point path for fractional parts, no silent truncation of three-point-five into three, and no acceptance of punctuation or symbols outside zero through nine and A through Z.

Where base-36 conversion fits in study, product codes, and software

Students meet base-36 when a textbook introduces place value beyond base ten, when a discrete-math course asks for radix conversion drills, or when a coding interview asks for a compact encoding of a short non-negative integer. Teachers can pre-generate answer keys for modest integers without trusting opaque calculator apps that silently drop signs or accept non-integers by rounding. Product and operations teams use base-36 for short human-readable codes: order suffixes, warehouse bin labels, invite tokens, and spreadsheet keys that must stay alphanumeric without looking like pure hex.

Web developers map sequential counters into denser strings for public IDs while still decoding them back to integers for joins and analytics. Developers call the same contract from scripts to seed deterministic test vectors for parsers, to validate user-entered short codes in configuration UIs, or to satisfy programming-challenge statements that demand a base-36 string rather than a hand-waved sketch. Pair it with related format tools such as decimal-to-hex or binary-to-decimal converters when you are building a small lab of free, deterministic radix helpers for digital literacy and systems work.

Homework and radix drills

Convert textbook whole numbers to base-36 and back, then verify place-value work before submitting answers.

Short codes and product IDs

Map sequential integers into compact 0-9 A-Z codes for labels, invite tokens, and human-readable suffixes.

What does the base36 encoder cost?

It is free in your browser on this page.

What characters are valid in base-36?

Digits 0-9 and letters A-Z (case-insensitive on input).

How is the conversion computed?

Encode uses repeated remainder: n mod 36 as the next digit, then floor(n/36). Zero maps to 0; negatives keep a leading minus.

What is 255 in base 36?

It is 73. The first digit counts thirty-sixes and the second counts ones, and converting 73 back from base 36 returns 255, so you can check the code in both directions.

Does it matter if I type lowercase letters?

Not when decoding: base-36 letters are read the same in upper or lower case. When encoding, the result is shown in uppercase, with a lowercase copy next to it.

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/fmt/base36

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/fmt/base36 \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"value":"255","direction":"to_base36"}'
{
  "value": "255",
  "direction": "to_base36"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "fmt.base36",
  "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
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.

You supply a value and a direction: to_base36 maps a whole number into uppercase base-36 digits, and from_base36 maps a case-insensitive base-36 string into a decimal integer. The engine is fully deterministic: encode peels remainders of thirty-six from the magnitude; decode accumulates digits with a left-to-right Horner scheme; invalid base-36 characters fail with a clear invalid_input error.

What base-36 conversion means and what the response contains

This calculator returns the original value echo, a normalized direction tag of to_base36 or from_base36, the decimal integer and its decimal_string form, an uppercase base36 string plus a base36_lower convenience field, a method tag base36, a short formula reminder of both remainder and Horner steps, and the base_from and base_to numbers for documentation. The engine either builds an exact conversion for a whole number or valid base-36 string inside the supported magnitude or rejects the input with invalid_input. Rejected cases include a missing value or direction, an empty string after trimming, a bare sign with no digits, non-integer decimal input when encoding, any invalid base-36 character when decoding, Infinity or NaN, and any magnitude larger than the documented maximum so results stay inside Number.MAX_SAFE_INTEGER.

How value and direction are read and how results stay reproducible

Outer whitespace is trimmed. When encoding, an optional leading plus or minus is allowed, then the remaining characters must be decimal digits only—no spaces, commas, underscores, decimal points, or exponent markers. A bare JavaScript number is accepted only when it is a finite integer. Encode uses repeated remainder extraction on the absolute value with uppercase output digits; decode uses Horner accumulation and normalizes the base36 field to uppercase. Zero maps to the single digit zero in both directions. The preferred field for the payload is value, but aliases v, input, text, number, n, decimal, and base36 are accepted so query strings, spreadsheets, and typed forms can reuse the same contract without renaming columns. Direction is required and selects the mapping: to_base36, to, encode, or decimal_to_base36 means treat value as a whole number and emit base-36 digits; from_base36, from, decode, or base36_to_decimal means treat value as a base-36 string and emit a decimal integer. When decoding, digits may be uppercase or lowercase A through Z, and an optional leading sign is allowed; any other character, including underscores, spaces, and punctuation, fails with invalid_input and a message that names the invalid base-36 character so a bad cell does not become a wrong integer. Magnitude is capped at Number.MAX_SAFE_INTEGER so JSON goldens compare without BigInt serialization quirks and every result is a safe integer path. Pair the free browser run on this page with the priced API when you need the identical mathematical result inside an automated pipeline without re-implementing base-36 conversion yourself.

Where base-36 conversion fits in study, product codes, and software

On this page the work runs entirely in your browser; through the API each successful lookup costs $0.002, failed validation is not charged, and nothing is stored after the response returns. That split—free interactive exploration and a priced, identical API—matches the rest of the KIT tier-A catalog and lets you move from a classroom demo to an automated pipeline without changing the mathematical result.

Deterministic test fixtures

Generate reproducible base36 and decimal pairs for unit tests, property checks, and CI assertions on parsers.

Which directions are supported?

Use direction to_base36 (or to, encode) to map a whole number to base-36, and from_base36 (or from, decode) to map a base-36 string to a decimal integer.

What is the maximum magnitude?

Nine quadrillion and change—exactly Number.MAX_SAFE_INTEGER (9007199254740991)—so results stay exact in JavaScript and JSON goldens.

Read the full KIT documentation →