Encoding tools

Encode and decode Base64, URLs and HTML entities, sign and decode JWTs, hash with SHA or bcrypt, and generate TOTP codes and key pairs in your browser.

Encode & decode 6

Tokens & hashes 7

Binary data 9

Encoding, hashing and encryption are different things

The tools on this page fall into three groups that are easy to mix up. Encoding changes how bytes are written so they survive a channel that only accepts text: Base64, URL encoding and HTML entities. Anyone can reverse it, with no key, so it hides nothing. Hashing turns any input into a fixed-size fingerprint that cannot be turned back: the Hash Generator computes MD5, SHA-1 and SHA-2 digests and HMACs, and the Bcrypt Generator makes and checks the slow, salted hashes that passwords need. Signing proves who made a message: a JWT signature, or the key pairs from the Key Pair Generator. Two articles go further: Base64 is not encryption and hashing is not encryption.

Picking the right encoding

Use Base64 when binary data must travel inside text: a JSON field, an Authorization: Basic header, a data URI. Choose the URL-safe alphabet (- and _, no padding) when the result goes into a URL or a file name. Use percent-encoding for ordinary text in a query string, such as a search term; the URL Parser splits a full URL into its parts, decodes each one and warns about risky details, such as a password written into the URL or a domain spelled with look-alike letters from another alphabet. The article on URL encoding pitfalls explains when a space should be %20 and when +.

Tokens, certificates and secrets

The JWT Decoder shows the header and the claims of a token, turns exp, iat and nbf into dates, and verifies HMAC signatures when you give it the secret. Decoding is not verifying: anyone can read a JWT, and a server must check the signature before it trusts a claim. The article on JWT verification shows what goes wrong when it does not. To build a token for a test, the JWT Encoder signs one with a shared secret or a PEM private key.

Some inputs should never be pasted into a site that sends them to a server. The Kubernetes Secret Decoder reads the Base64 values of a Secret manifest in the page. The Certificate Decoder reads a PEM certificate or a whole chain offline and shows the names, the validity dates against your clock, the key and the fingerprints. The TOTP Generator computes 2FA codes from a Base32 secret without that secret leaving the tab.

Binary formats

When you have bytes rather than text, start with the Hex Dump to see what they are. The Protobuf Decoder reads protobuf messages without the .proto schema, by field number and wire type, and the MessagePack and CBOR converters translate those formats to JSON and back. The article comparing JSON, CBOR, MessagePack and Protobuf measures how much each one saves once the data is compressed.

In-depth articles