EditSafely

Change a Number's Base

Quickly convert a number from one base to any other base. Runs entirely in your browser, so your data never leaves your device.

0 chars · 0 lines

Output

The result appears here as you type.

Options

How to use Change a Number's Base

  1. 1. Paste the number to convert. Enter the number you want converted, written in the digits appropriate for its current base, such as 255 for decimal or ff for hexadecimal.
  2. 2. Set the from and to base. Enter From base and To base, anywhere from 2 to 36, to control the source and target numeral systems for the conversion.
  3. 3. Copy the converted number. Copy the resulting value in the target base from the output and use it in your programming, networking or math work.

When to use Change a Number's Base

Change a Number's Base converts a number between any two numeral systems from base 2 to base 36, going beyond the common binary, octal, decimal and hex pairs. It suits anyone working with an unusual base like 20 or 36.

  • Converting between uncommon numeral systems. A puzzle or historical numeral system uses a base other than the common 2, 8, 10 or 16, such as base 20 or base 36, and you need a quick conversion.
  • Debugging a custom base-N encoder. A developer building a URL shortener or ID encoder using a non-standard base wants a trusted reference conversion to compare their encoding function against.
  • Solving a number theory or programming puzzle. A coding challenge asks you to convert numbers between arbitrary bases, and you want to verify a hand-worked example before writing the solution code.
  • Teaching positional numeral systems. A computer science course covers how positional notation generalizes beyond base 10, and an instructor wants worked examples in several less common bases.

Examples

Decimal to binary

Input

255

Output

11111111

Hex to decimal (from base 16, to base 10)

Input

ff
-cafe

Output

255
-51966

Decimal to base 36 (to base 36)

Input

1295

Output

zz

About the Change a Number's Base tool

Change a Number's Base runs as plain JavaScript in your browser tab, with no server behind it. Quickly convert a number from one base to any other base. Whatever you put in stays on your device from start to finish.

The tool is part of EditSafely's Number Tools section, 194 single-purpose utilities built around the same idea: open the page, get the result, keep your data to yourself.

You can shape the output with 2 settings, including From base and To base, and the result refreshes the moment you change one. 3 worked examples further down the page show exactly what the tool produces for real inputs.

That local-first design has practical benefits beyond privacy. The tool keeps working on a flaky connection once the page has loaded, results are instant because nothing round-trips to a server, and it is safe to use with confidential material.

Frequently asked questions

Is Change a Number's Base free to use?

Yes, it is completely free. All 2,658 tools on EditSafely work without an account, a subscription or usage limits.

Is it safe to paste sensitive or confidential data?

Everything happens locally. Your browser downloads the tool's code once, then does all the processing itself; nothing you enter is transmitted, stored or logged. You can even go offline after the page loads and it will still work.

How much text can I process at once?

There is no fixed limit. Because the work happens on your own device rather than on a shared server, the practical ceiling is your machine's memory, which comfortably handles inputs far larger than typical online tools allow.

Do I need to sign up or install anything?

No. The tool works in any modern browser on desktop, tablet or phone. There is no account to create, no extension to add and no software to install.

How do I use the result?

The output panel has a one-click copy button, and you can keep refining the input while you work; the result updates in place as you type.