Formats Registry
Considerations
The existence of a format in this registry DOES NOT require tools to implement it.
If tools choose to implement any format present in this registry, they SHOULD implement the format following the provided behavior.
The registry SHOULD NOT contain two entries that have the same meaning, unless all but one have been deprecated.
Contributing
Please raise a Pull-Request or Issue to contribute or discuss a registry value.
Values
For the purpose of JSON Schema validation, each format should specify the set of JSON data types for which it applies. In this registry, these types are shown in the “JSON data type” column.
Value | Description | JSON Data Type | Source | Deprecated |
---|---|---|---|---|
base64url | Binary data encoded as a url-safe string as defined in RFC4648 | string | Yes | |
binary | any sequence of octets | string | OAS | Yes |
byte | base64 encoded data as defined in RFC4648 | string | OAS | Yes |
char | A single character | string | No | |
commonmark | commonmark-formatted text | string | OAS | No |
date-time | date and time as defined by date-time - RFC3339 | string | JSON Schema | No |
date | date as defined by full-date - RFC3339 | string | JSON Schema | No |
decimal | A fixed point decimal number of unspecified precision and range | string, number | No | |
decimal128 | A decimal floating-point number with 34 significant decimal digits | string, number | No | |
double-int | an integer that can be stored in an IEEE 754 double-precision number without loss of precision | number | No | |
double | double precision floating point number | number | OAS | No |
duration | duration as defined by duration - RFC3339 | string | JSON Schema | No |
An email address as defined as Mailbox in RFC5321 | string | JSON Schema | No | |
float | single precision floating point number | number | OAS | No |
hostname | A host name as defined by RFC1123 | string | JSON Schema | No |
html | HTML-formatted text | string | OAS | No |
http-date | date and time as defined by HTTP-date - RFC7231 | string | No | |
idn-email | An email address as defined as Mailbox in RFC6531 | string | JSON Schema | No |
idn-hostname | An internationalized host name as defined by RFC5890 | string | JSON Schema | No |
int16 | signed 16-bit integer | number | No | |
int32 | signed 32-bit integer | number | OAS | No |
int64 | signed 64-bit integer | number, string | OAS | No |
int8 | signed 8-bit integer | number | OAS | No |
ipv4 | An IPv4 address as defined as dotted-quad by RFC2673 | string | JSON Schema | No |
ipv6 | An IPv6 address as defined by RFC4673 | string | JSON Schema | No |
iri-reference | A Internationalized Resource Identifier as defined in RFC3987 | string | JSON Schema | No |
iri | A Internationalized Resource Identifier as defined in RFC3987 | string | JSON Schema | No |
json-pointer | A JSON string representation of a JSON Pointer as defined in RFC6901 | string | JSON Schema | No |
media-range | A media type as defined by the media-range ABNF production in RFC9110. | string | OpenAPI | No |
password | a string that hints to obscure the value. | string | OAS | No |
regex | A regular expression as defined in ECMA-262 | string | JSON Schema | No |
relative-json-pointer | A JSON string representation of a relative JSON Pointer as defined in draft RFC 01 | string | JSON Schema | No |
sf-binary | structured fields byte sequence as defined in [RFC8941] | string | RFC 8941 | No |
sf-boolean | structured fields boolean as defined in [RFC8941] | string | RFC 8941 | No |
sf-decimal | structured fields decimal as defined in [RFC8941] | number | RFC 8941 | No |
sf-integer | structured fields integer as defined in [RFC8941] | number | RFC 8941 | No |
sf-string | structured fields string as defined in [RFC8941] | string | RFC 8941 | No |
sf-token | structured fields token as defined in [RFC8941] | string | RFC 8941 | No |
time | time as defined by full-time - RFC3339 | string | JSON Schema | No |
uint8 | unsigned 8-bit integer | number | OAS | No |
uri-reference | A URI reference as defined in RFC3986 | string | JSON Schema | No |
uri-template | A URI Template as defined in RFC6570 | string | JSON Schema | No |
uri | A Uniform Resource Identifier as defined in RFC3986 | string | JSON Schema | No |
uuid | A Universally Unique IDentifier as defined in RFC4122 | string | JSON Schema | No |