← All Tools

HTTP Structured Field Values Builder & Parser

RFC 8941 (+ RFC 9651) is the parsing spec every modern HTTP header now piggybacks on — Cache-Status, Priority, Accept-CH, Signature-Input, Content-Digest, CDN-Cache-Control, Client-Hints. Paste any of them here to see the parsed item, list, or dictionary tree, its parameters, and a lint pass for the corner cases (leading zeros on integers, un-escaped strings, over-long tokens, forbidden characters, missing quotes on byte sequences, and the 15-digit / 12-digit / 6-digit precision caps).

Parse

Presets: Priority Cache-Status CDN-Cache-Control Accept-CH Content-Digest Signature-Input Want-Content-Digest Sec-CH-UA Alt-Svc-ish RFC 9651 date

Parsed structure

Round-trip

Re-serialised from the parsed tree — whitespace collapses, canonical form for identifiers.


    

JSON view (Structured-Field-Tests format):


  

Grammar cheat-sheet

TypeSyntaxNotes
Integer-15, 1234567890123456*±15 digits max; no leading zeros; -00.
Decimal3.14, -0.001≤12 integer digits, 1–3 fractional; if only integer digits, prefer sf-integer.
String"hello world"ASCII 0x20–0x7E only; escape \\ and \". Use display-string for Unicode.
Tokenhit, gzip, */fooStarts with alpha or *, then a–z A–Z 0–9 _ . : % * / -.
Byte seq:aGVsbG8=:base64 wrapped in colons; empty is ::.
Boolean?0, ?1Only two legal values.
Date (RFC 9651)@1704067200Unix seconds; treat as sf-integer for RFC-8941-only parsers.
Display string%"caf%c3%a9"RFC 9651; percent-encoded UTF-8, wrapped with %"".
Inner list(a b c);q=1Space-separated bare items wrapped in (…); may carry its own parameters.
Parameters;key=val;flagSemi-colon list attached to any item; bare key means ?1.

What uses SFV in real HTTP?