Arbitrary Base Number Converter (Javascript)
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.
value | base / alphabet | convert! |
Base Alphabets of Interests
binarybase 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: