Convert integers between bases 2–64
Supports binary, octal, decimal, hexadecimal, base64, and custom bases (2–64)

The Integer Base Converter translates a whole number from one base (radix) to another — anywhere from to . It’s perfect when you bounce between binary, octal, decimal, hexadecimal, and “custom” bases used in programming, data formats, and compact identifiers.
What problem does it solve?
This converter runs locally in your browser. If you’re pasting sensitive identifiers, you’re not sending them to a server from this tool.
If you’re working with tokens and IDs, you may also like our Token Generator or UUID Generator to create values, then use this converter to inspect or transform their numeric parts.
Step-by-step
Enter your number
Type the integer exactly as written in its current base (no prefixes like ).
Set the input base
Choose the base the number is currently in. For binary use , for hex use .
Pick an output base
You’ll see common outputs (binary/oct/dec/hex/base64) plus a custom output base.
Copy the result
Use the copy button next to an output row to paste it into code, a document, or a config file.
Mini diagram (what happens under the hood)
Input
Digits in base (input base)
Output
Same value expressed in base (output base)
In practice, the tool converts to an internal integer value and then re-encodes it using the target base’s digit set.
How to interpret outputs
Digit set used by this tool (bases up to )
This converter uses a fixed digit set in this exact order:
0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/
Example: in base , the digits are 0–9 and a–f.
Example 1: Decimal to binary (sanity check)
Background: you see in a UI, but a config file needs binary.
Inputs: value , input base , output base .
How to apply it: if you ever doubt the binary output, convert it back to decimal and confirm it returns .
Example 2: Hex to decimal (log parsing)
Background: a system log prints a code like 7b and you need the decimal value.
Inputs: value , input base , output base .
How to apply it: you can now compare the code numerically (thresholds, ordering, etc.). If you’re hashing values for logs, pairing with our Hash Text tool can be handy.
Example 3: Base64 digits (compact integer IDs)
Background: you store an integer ID in a compact base representation.
Inputs: value , input base , output base .
How to apply it: you can sort IDs numerically, or switch to base for debugging. If you’re generating IDs, you may prefer ULID Generator for lexicographic ordering.
Example 4: Binary bitmasks (feature flags)
Background: a flag value is stored as binary, but you want its decimal form for an API call.
Inputs: value , input base , output base .
How to apply it: convert back to binary after editing the decimal value so you don’t accidentally flip the wrong bits.
These are the moments where a base converter saves real time — especially when you’re switching contexts between code, databases, and debugging tools.
Convert → to compare values and thresholds.
Convert ↔ to verify which bits are set.
Convert to base for shorter strings; convert back for sorting/debugging.
Convert pieces of IDs to check ranges, shards, or embedded timestamps.
Convert numeric constants to confirm key sizes and boundaries.
Convert once, then copy the output row you need (hex for dev tools, decimal for docs).
When it may not be a fit
Normalize your input
Remove spaces and separators before converting. For hex-like values, avoid prefixes like and keep letters consistent with the tool’s digit set.
Do a quick round-trip check
Convert and then back . If you get the original digits, you can trust the conversion.
Watch for invalid digits
In base , only and are allowed. Any other digit should be treated as an error.
Remember: base64 here is not text encoding
This tool’s base uses digits , letters, plus and . It does not perform byte-to-text base64 encoding.
Common mistakes to avoid
Base conversion relies on positional notation. If a number has digits in base , its value is the weighted sum of each digit.
(positional value in base b)
Variables explained
Worked conversion (shown as a multi-step layout)
Convert to decimal:
The only “trick” is remembering that the digit means in base .
Positional notation
In any base , the place values are powers of . That’s why a single digit can “mean” different things depending on where it sits.
Digit sets and case sensitivity
For bases above , the tool uses letters as additional digits. In this converter, lowercase and uppercase are distinct digits once you go above .
Practical tip: if you’re expecting “classic hex” with uppercase A–F, either keep your input lowercase, or switch to a consistent format before converting.
Why base conversion matters
Any integer base from to . That includes binary, octal, decimal, hexadecimal, and a base digit set.
No — inputs must be non-negative integers. A leading minus sign is treated as an invalid digit.
It means at least one character isn’t allowed in the input base. For example, base allows only and .
Not exactly. “Base ” here means “write an integer using possible digits.” Base64 encoding (RFC 4648) converts bytes to text and uses padding rules; this converter doesn’t do that.
Use positional notation: multiply each digit by a power of the base and sum them. For a quick check, a small number is easiest.
Yes, up to your browser’s practical limits. Under the hood, this kind of converter typically uses arbitrary-size integers (like JavaScript ) so you’re not constrained by the way normal numbers are.
Use a simple chronometer (stopwatch) to track elapsed time down to milliseconds. Runs locally in your browser.
Normalize email addresses to a standard format for easier comparison. Useful for deduplication and data cleaning. Runs locally in your browser.
Estimate the time needed to consume a total amount at a constant rate, and get an expected end time. Runs locally in your browser.
Parse and decode your JSON Web Token (JWT) and display its content. All computation runs locally in your browser.
Know which file extensions are associated to a MIME type, and which MIME type is associated to a file extension. Includes a full MIME types table.
Generate random Lorem Ipsum placeholder text with customizable paragraphs, sentences, and word counts. Runs locally in your browser.