URI Template Expander (RFC 6570)
Expand RFC 6570 URI templates with your own variables — all four levels, with path, query, fragment and label operators and explode modifiers.
Expanded URL
https://api.example.com/v2/users/42?fields=name&fields=email&page=1
Implements all four RFC 6570 levels: operators + : # . / ; ? & with explode (*) and prefix (:n) modifiers.
How to use
- Enter a URI template using {braces}, e.g. {/path}{?query*}.
- Provide the variables as a JSON object (strings, numbers, arrays, or objects).
- Read the expanded URL and copy it; tweak the template or variables to see the result update live.
About this tool
ShowHide
RFC 6570 URI templates describe how to build a URL from variables, and they're everywhere: the GitHub API, OpenAPI/Swagger path templates, and hypermedia (HAL/JSON-LD) links all use them. A template like https://api.example.com{/version}/users{/id}{?fields*,page} expands against a set of variables into a real URL. This tool implements all four levels of the spec — simple {var} expansion, the reserved ({+var}) and fragment ({#var}) operators, label (.), path (/), path-style parameter (;), form-query (?), and continuation (&) operators — plus the explode (*) and prefix (:n) modifiers and correct handling of empty and undefined values. Provide variables as a JSON object whose values are strings, numbers, lists, or key/value maps; the output is percent-encoded exactly as the operator requires. It's verified against the full RFC 6570 example suite. Everything runs locally — nothing is uploaded.
Frequently asked questions
What do the operators mean?
The first character inside the braces selects an operator: none = simple comma-joined values; + keeps reserved characters unescaped; # makes a fragment; . a label; / path segments; ; path-style ;name=value params; ? a form query ?name=value; & a query continuation. Each controls its own separator and whether names are included.
What do * and :n do?
* is the explode modifier: a list or map expands into separate components (e.g. {?list*} → ?list=a&list=b instead of ?list=a,b). :n is a prefix modifier that truncates a string value to the first n characters before encoding (e.g. {var:3} of value → val).
How do I pass lists and maps?
Use JSON: a list is an array ("fields": ["name","email"]) and an associative map is an object ("keys": {"semi": ";"}). Strings and numbers are scalars. A variable that's missing, null, an empty list, or an empty object is treated as undefined and contributes nothing to the output.
Is the encoding correct?
Yes — values are percent-encoded per the operator's allowed set. Simple and most operators encode everything outside the unreserved set, while + and # also pass reserved URL characters (and existing %XX triples) through unescaped, matching RFC 6570. The implementation passes the spec's full example table.
Related tools
Relative URL Resolver (RFC 3986)
Resolve a relative reference against a base URI by RFC 3986, with the dot-segment trace and the browser’s answer beside it.
Network
IPv6 Expander / Compressor
Toggle any IPv6 address between its shorthand ::1 form and the fully-expanded 8-group representation, with reverse DNS and binary too.
Network
/.well-known/* URI Reference
Searchable catalog of well-known URIs registered with IANA — security.txt, openid-configuration, acme-challenge and 30+ more, with RFCs.
Network
URL Encoder / Decoder
Percent-encode text for URLs, or decode encoded URLs back to text.
Developer
Data URI Parser & Decoder
Decode a data: URI to see its MIME type, encoding, size and decoded contents, in your browser.
Developer
HKDF Key Derivation (RFC 5869, extract-expand)
Derive keys with HKDF and see both halves: the PRK from extract, every T block from expand, and the OKM in hex and base64. RFC 5869 cases built in.
Developer