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
Run — free
Worked example
- Value to convert
- 255
- Conversion direction
- to_base36
- 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.
What you can do with it
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.
FAQ
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.
Related tools
For developers — API access
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.
API endpoint
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.
Call it from your stack
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"}'const res = await fetch("https://api.kit.forhosting.com/fmt/base36", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"value": "255",
"direction": "to_base36"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/fmt/base36",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"value": "255",
"direction": "to_base36"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/fmt/base36", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"value":"255","direction":"to_base36"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"value":"255","direction":"to_base36"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/fmt/base36", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"value": "255",
"direction": "to_base36"
}Example response
{
"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.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_abs | 9007199254740991 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
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.
Integration use cases
Deterministic test fixtures
Generate reproducible base36 and decimal pairs for unit tests, property checks, and CI assertions on parsers.
Technical questions
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.