To the Top

Arbitrary Base Number Converter (Javascript)

This page provides a Javascript online utility (implementation) to convert numbers from a base to another base. The base 10 is used as a intermediate base for conversion.
This works for arbitrary bases, but the values must be non-negative integers less than 2^31. The conversion is based on given two alphabets. You can enter the characters you want, for example, the alphabet of hexadecimal is 0123456789abcdef, of course, you can mess around with the alphabet for fun. The larger alphabet/base will provide a smaller encoding for large numbers. The commonly-used base is base 2 (Binary), base 4, base 8 (Oct), base 10 (Dec), base 16 (Hex), base 36 and Base 62.
valuebase / alphabetconvert!

Base Alphabets of Interests

binary
base 4
octal
decimal
hexadecimal
base 36 (alphanumeric without case)
base 62 (alphanumeric with case)
base 75


Pascal/VBScript/Python
Javascript Download

Use the arbitrary base conversion in your application easily; convert.pas - convert.vbs - convert.py - convert.js - convertc.js (Compressed)

Share This

Link here!

Just paste the HTML code, shown below, onto the site of your choice.
    <a href="https://rot47.net/base.html" title="Arbitrary base conversion in javascript Encoder/Decoder">Online Arbitrary Base Conversion in javascript</a>
Plain text example:
Online Arbitrary Base Conversion in javascript

Page Edited: