MeridianMERIDIAN

URL-Safe Base64 Token

technology.cryptographic.token_urlsafe

Random token encoded in URL-safe Base64 (uses - and _ instead of + and /). Commonly used for auth tokens, reset links, and secure identifiers.

Casts to
VARCHAR

Shape

Pattern
^[A-Za-z0-9_-]{12,128}$
ValueLengthShape
SFMyNDI5STExOjEwMQ18matches
dGVzdC10b2tlbg14matches
aGVsbG8td29ybGQ15matches

Told apart

Going the other way, this type's own rule accepts 3 of 3 samples of Cryptographic Hash.

Background

Origin

RFC 4648 notes that the pad character = is typically percent-encoded when used in a URI, and that padding can be skipped if the data length is known implicitly.[1] RFC 7515, JSON Web Signature (JWS), defines Base64url Encoding as the RFC 4648 URL-safe alphabet with all trailing = characters omitted.[2]

Use

Python's secrets.token_urlsafe returns a random URL-safe text string containing a given number of random bytes, Base64 encoded.[3] The Python documentation says each random byte becomes approximately 1.3 characters on average in a token_urlsafe string.[3] The illustrative implementation in PEP 506 strips the trailing = padding from the URL-safe Base64 output.[4] Node.js's base64url Buffer encoding follows RFC 4648 Section 5 and omits padding when encoding a Buffer to a string.[5]

A column of reset tokens or session identifiers is sensitive, so it is worth masking or dropping before a file is shared. (Meridian's view)

Detection notes

v1 migration: Was cryptographic.token_urlsafe. URL-safe Base64 avoids characters that need escaping in URLs. Length typically 12-128 chars.

Use it

CLI · DuckDB
$ finetype infer -i "SFMyNDI5STExOjEwMQ" --mode column
→ technology.cryptographic.token_urlsafe

SELECT ft_infer('SFMyNDI5STExOjEwMQ');
-- → 'technology.cryptographic.token_urlsafe'
Cast expression
CAST({col} AS VARCHAR)

Schema

https://meridian.online/schemas/technology.cryptographic.token_urlsafe · Frictionless type string

finetype taxonomy technology.cryptographic.token_urlsafe -o json-schema

Aliases

urlsafe_token

Type Registry