JSON Web Signatures specify how to encode binary data along with signatures and metadata in RFC 7515.
As indicated in section 3 of the RFC, "JWS represents digitally signed or MACed content using JSON data structures and base64url encoding."
It also specifies how the JWS may be used for JWT, JSON Web Tokens.