Base58 and Base85
Encode and decode Base58 and Ascii85, show bytes as a hex dump, and generate short random Nano IDs. Typical uses: build short identifiers for URLs, inspect the bytes of a file or message.
string encode_b58string encode_b58string decode_b58string decode_b58string encode_b85string encode_b85string decode_b85string decode_b85string hex_dumpstring hex_dumpstring nanoidstring nanoid
string encode_b58 <text>
Description
Encode in Base58 (Bitcoin alphabet). The leading zero bytes become 1
Encode in Base58 (Bitcoin alphabet). The leading zero bytes become 1
Parameters
text: The text (or bytes in hex or base64, see input_encoding) - String - required
text: The text (or bytes in hex or base64, see input_encoding) - String - required
admin
string encode_b58 "hello world"
mentdb
StV1DL6CwTryKyV
string encode_b58 <text> <params>
Description
Encode in Base58 with parameters: input_encoding (utf-8, hex or base64), check (true: Base58Check, 4 bytes of double SHA-256 at the end)
Encode in Base58 with parameters: input_encoding (utf-8, hex or base64), check (true: Base58Check, 4 bytes of double SHA-256 at the end)
Parameters
text: The text (or bytes in hex or base64, see input_encoding) - String - required
params: The parameters as JSON - String - required
text: The text (or bytes in hex or base64, see input_encoding) - String - required
params: The parameters as JSON - String - required
admin
string encode_b58 "00000a2f" "{\"input_encoding\": \"hex\"}"
mentdb
11mx
Base58Check of a version byte 00 and a 20 bytes hash: a Bitcoin address
admin
string encode_b58 "00f54a5851e9372b87810a8e60cdd2e7cfd80b6e31" "{\"input_encoding\": \"hex\", \"check\": true}"
mentdb
1PMycacnJaSqwwJqjawXBErnLsZ7RkXUAs
Used in use cases (1 recipe)
Security engineer › Issue API keys and store passwords without keeping any secret in clear
Security engineer › Issue API keys and store passwords without keeping any secret in clear
Often used with
string blake2b · string decode_b58 · string length · string nanoid · string scrypt_hash · string scrypt_verify · string substr
string blake2b · string decode_b58 · string length · string nanoid · string scrypt_hash · string scrypt_verify · string substr
string decode_b58 <text>
Description
Decode Base58 into a UTF-8 text
Decode Base58 into a UTF-8 text
Parameters
text: The Base58 text - String - required
text: The Base58 text - String - required
admin
string decode_b58 "StV1DL6CwTryKyV"
mentdb
hello world
a character out of the alphabet
admin
string decode_b58 "StV1DL0"
mentdb
ERROR: Sorry, an error appears (the parameter 'text' is not base58: the character at position 7 is not in the Bitcoin alphabet (no 0, O, I or l)).
string decode_b58 <text> <params>
Description
Decode Base58 with parameters: output_encoding (utf-8, hex or base64), check (true: verify and remove the 4 bytes of Base58Check)
Decode Base58 with parameters: output_encoding (utf-8, hex or base64), check (true: verify and remove the 4 bytes of Base58Check)
Parameters
text: The Base58 text - String - required
params: The parameters as JSON - String - required
text: The Base58 text - String - required
params: The parameters as JSON - String - required
admin
string decode_b58 "1PMycacnJaSqwwJqjawXBErnLsZ7RkXUAs" "{\"check\": true, \"output_encoding\": \"hex\"}"
mentdb
00f54a5851e9372b87810a8e60cdd2e7cfd80b6e31
one character changed: the checksum fails
admin
string decode_b58 "1PMycacnJaSqwwJqjawXBErnLsZ7RkXUAt" "{\"check\": true, \"output_encoding\": \"hex\"}"
mentdb
ERROR: Sorry, an error appears (the Base58Check checksum is wrong: the text was altered or mistyped).
Used in use cases (1 recipe)
Security engineer › Issue API keys and store passwords without keeping any secret in clear
Security engineer › Issue API keys and store passwords without keeping any secret in clear
Often used with
string blake2b · string encode_b58 · string length · string nanoid · string scrypt_hash · string scrypt_verify · string substr
string blake2b · string encode_b58 · string length · string nanoid · string scrypt_hash · string scrypt_verify · string substr
string encode_b85 <text>
Description
Encode in Ascii85
Encode in Ascii85
Parameters
text: The text (or bytes in hex or base64, see input_encoding) - String - required
text: The text (or bytes in hex or base64, see input_encoding) - String - required
admin
string encode_b85 "Hello World!"
mentdb
87cURD]i,"Ebo80
string encode_b85 <text> <params>
Description
Encode in Base85 with parameters: variant (ascii85, z85 or rfc1924), input_encoding (utf-8, hex or base64), delimiters (true: <~ ~> around Ascii85, as in PostScript and PDF)
Encode in Base85 with parameters: variant (ascii85, z85 or rfc1924), input_encoding (utf-8, hex or base64), delimiters (true: <~ ~> around Ascii85, as in PostScript and PDF)
Parameters
text: The text (or bytes in hex or base64, see input_encoding) - String - required
params: The parameters as JSON - String - required
text: The text (or bytes in hex or base64, see input_encoding) - String - required
params: The parameters as JSON - String - required
admin
string encode_b85 "864FD26FB559F75B" "{\"input_encoding\": \"hex\", \"variant\": \"z85\"}"
mentdb
HelloWorld
Ascii85 with delimiters
admin
string encode_b85 "Hello World!" "{\"delimiters\": true}"
mentdb
<~87cURD]i,"Ebo80~>
Z85 needs a multiple of 4 bytes
admin
string encode_b85 "abc" "{\"variant\": \"z85\"}"
mentdb
ERROR: Sorry, an error appears (Z85 needs a number of bytes that is a multiple of 4 (here 3)).
string decode_b85 <text>
Description
Decode Ascii85 into a UTF-8 text. Spaces and line breaks are ignored, <~ ~> are accepted
Decode Ascii85 into a UTF-8 text. Spaces and line breaks are ignored, <~ ~> are accepted
Parameters
text: The Ascii85 text - String - required
text: The Ascii85 text - String - required
admin
string decode_b85 "<~87cURD]i,\"Ebo80~>"
mentdb
Hello World!
string decode_b85 <text> <params>
Description
Decode Base85 with parameters: variant (ascii85, z85 or rfc1924), output_encoding (utf-8, hex or base64)
Decode Base85 with parameters: variant (ascii85, z85 or rfc1924), output_encoding (utf-8, hex or base64)
Parameters
text: The Base85 text - String - required
params: The parameters as JSON - String - required
text: The Base85 text - String - required
params: The parameters as JSON - String - required
admin
string decode_b85 "HelloWorld" "{\"variant\": \"z85\", \"output_encoding\": \"hex\"}"
mentdb
864fd26fb559f75b
the alphabet of Git and of Python b85encode
admin
string decode_b85 "NM&qnZy;B1a%^NF" "{\"variant\": \"rfc1924\"}"
mentdb
Hello World!
string hex_dump <text>
Description
Show bytes as hexdump -C -v does: the offset, 16 bytes in hexadecimal in two groups of 8, then the printable characters (a point for the others), and the length on the last line
Show bytes as hexdump -C -v does: the offset, 16 bytes in hexadecimal in two groups of 8, then the printable characters (a point for the others), and the length on the last line
Parameters
text: The text (or bytes in hex or base64, see input_encoding) - String - required
text: The text (or bytes in hex or base64, see input_encoding) - String - required
admin
string hex_dump "Café 2026"
mentdb
00000000 43 61 66 c3 a9 20 32 30 32 36 |Caf.. 2026| 0000000a
string hex_dump <text> <params>
Description
Dump with parameters: input_encoding (utf-8, hex or base64), width (bytes per line, 16, from 1 to 64), offset (the first offset shown, 0), max_bytes (1048576, up to 16777216; a longer input is cut and the result says how many bytes were not shown)
Dump with parameters: input_encoding (utf-8, hex or base64), width (bytes per line, 16, from 1 to 64), offset (the first offset shown, 0), max_bytes (1048576, up to 16777216; a longer input is cut and the result says how many bytes were not shown)
Parameters
text: The text (or bytes in hex or base64, see input_encoding) - String - required
params: The parameters as JSON - String - required
text: The text (or bytes in hex or base64, see input_encoding) - String - required
params: The parameters as JSON - String - required
admin
string hex_dump "89504e470d0a1a0a0000000d49484452" "{\"input_encoding\": \"hex\", \"width\": 8}"
mentdb
00000000 89 50 4e 47 0d 0a 1a 0a |.PNG....| 00000008 00 00 00 0d 49 48 44 52 |....IHDR| 00000010
string nanoid
Description
A random Nano ID of 21 characters (A-Z, a-z, 0-9, _ and -), for URLs and file names
A random Nano ID of 21 characters (A-Z, a-z, 0-9, _ and -), for URLs and file names
admin
string nanoid
mentdb
HfKlngeE2rmSjHKStyIF1
string nanoid <params>
Description
A random Nano ID with parameters: size (21, from 1 to 1024), alphabet (2 to 256 different characters, any Unicode characters)
A random Nano ID with parameters: size (21, from 1 to 1024), alphabet (2 to 256 different characters, any Unicode characters)
Parameters
params: The parameters as JSON - String - required
params: The parameters as JSON - String - required
admin
string nanoid "{\"size\": 10, \"alphabet\": \"23456789ABCDEFGHJKLMNPQRSTUVWXYZ\"}"
mentdb
2J97LQJDPN
an alphabet with a repeated character
admin
string nanoid "{\"alphabet\": \"abca\"}"
mentdb
ERROR: Sorry, an error appears (the parameter 'alphabet' holds the character 'a' twice).
Used in use cases (1 recipe)
Security engineer › Issue API keys and store passwords without keeping any secret in clear
Security engineer › Issue API keys and store passwords without keeping any secret in clear
Often used with
string blake2b · string decode_b58 · string encode_b58 · string length · string scrypt_hash · string scrypt_verify · string substr
string blake2b · string decode_b58 · string encode_b58 · string length · string scrypt_hash · string scrypt_verify · string substr
