JavaScript BaseX converter
Pure JavaScript base encode decoder
Javascript Base64, Base16, text to bytes array converter.
Usage
Encoding
Encode "Hello world" to Base64
;...const unibytes = JSHexi;const bytes = JSHexi;// now bytes contains Uint8Array with bytes JSHexi;// Output: AEgAZQBsAGwAbwAgAHcAbwByAGwAZAAgACj/YSXVID8l1f9hACk= JSHexi;// Output: SGVsbG8gd29ybGQ=
Decoding
Encode "AEgAZQBsAGwAbwAgAHcAbwByAGwAZAAgACj/YSXVID8l1f9hACk=" / "SGVsbG8gd29ybGQ=" to String
;...const bytes = JSHexi;const unibytes = JSHexi;// now bytes contains Uint8Array with bytes JSHexi;// Output: Hello world (。◕‿◕。) JSHexi;// Output: Hello world
More examples
You can see in test folders