Unveil

Code

Ways of writing that hide nothing by design — bases, bits, binary formats, floats, Unicode, Roman numerals, timestamps, coordinates, check digits — read and written both ways.

Base Converter

Reads a text in one format and writes it in another: text in UTF-8 or EBCDIC, binary, hex, decimal, octal, the Base64, Base32, Base58, Base85 and Base45 family, Crockford’s Base32 and z-base-32, uuencode, proquints, Modhex, Bubble Babble, COBS, BIP-39’s words, URL encoding, Punycode, HTML entities, escapes and quoted-printable; a hex dump and a JSON Web Token are read. Each by its specification, named in About.

Terms

History, how it works, how it was checked, limits

History

RFC 4648 (2006) specifies Base16, Base32 and Base64, the last also URL-safe; RFC 3986 percent-encoding, RFC 7519 the JSON Web Token. Ascii85 is Adobe’s; Base58 is Bitcoin’s alphabet. uuencode is Unix’s, written down by POSIX; Crockford’s Base32 (2002) leaves out I, L, O and U; proquints (Wilkerson, 2009) make sixteen bits five letters to say aloud; Punycode (RFC 3492, 2003) writes domain names in ASCII; Base45 (RFC 9285, 2022) writes two bytes in three characters; COBS (1999) takes the zeros out of a packet. EBCDIC is IBM’s character code; BIP-39 (2013) writes a wallet’s secret bytes as words.

How it works

One text is read in one format and written in another. Every format goes both ways but a hex dump and a JWT, which are only read. BIP-39 takes 16, 20, 24, 28 or 32 bytes and sets after them a checksum from their SHA-256; its text and result are kept out of saved sessions and links until the field is emptied. Under the result the bytes are drawn as their bits, each format’s symbols over the bits they stand for, as RFC 4648 §9 draws Base64’s, with a hex dump. Bytes that are not UTF-8 are shown as hexadecimal; a JWT is read out as header, payload and signature, its times as dates, and an HMAC signature checked against a secret typed under it.

How it was checked

Every codec but BIP-39’s is utils/encodings.js’s. Base64 and Base32 reproduce RFC 4648’s test vectors both ways; Base58 gives the Bitcoin wiki’s 2NEpo7TZRRrLZSi2U for “Hello World!”; a JWT is read on RFC 7519’s example and its HMAC checked on RFC 7515’s. Base45 gives RFC 9285’s examples; proquints Wilkerson’s twelve addresses; Punycode RFC 3492’s samples A, B, L and S; uuencode the lines Python’s binascii writes; Crockford’s Base32 the ULID specification’s example. Bubble Babble, Modhex and COBS give their sources’ own examples. EBCDIC decodes all 256 bytes as Python’s cp037 codec does; BIP-39 gives the 24 English vectors it names, both ways. The drawing gives RFC 4648 §9’s three examples.

The tests hold 162 checks of this tool; 45 rest on outside material, the first eight here:

  • A standard’s own vectors Base64 (RFC 4648 §10)
  • A standard’s own vectors Base32 (RFC 4648 §10)
  • A standard’s own vectors Quoted-printable (RFC 2045)
  • A standard’s own vectors Base64 (RFC 4648 §10): foobar
  • A standard’s own vectors Base32 (RFC 4648 §10): foobar
  • A standard’s own vectors Every two-way format returns what it was given (proquints, of sixteen bits, an even number of bytes; BIP-39’s words, of 16 to 32, these 16)
  • A standard’s own vectors JWT (RFC 7519 §3.1): header and claims read
  • A standard’s own vectors RFC 4648 §9: 0x14fb9c03d97e drawn as the RFC draws it, 8-bit to 6-bit

The other 37, and every tool’s checks

Limits

Decimal and octal are bytes, not numbers: 1000 is refused. A JWT’s signature is checked only where it is an HMAC. EBCDIC is code page 037 alone; of BIP-39 only the English list, and the seed it makes of the words is not made. Bech32, Base62, basE91 and the PGP word list are left out; Sources & method says why. The hex dump shows the first 512 bytes.