URI Template Expander (RFC 6570)
Network
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.
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.
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
MAC Address Formatter
Reformat a MAC address between colon, hyphen, Cisco dot and no-separator notation, in upper or lower case — and see its unicast/multicast and universal/local type.
IPv4 Address Converter
Convert an IPv4 address between dotted-decimal, 32-bit integer, hex and binary — and see whether it's private, public, loopback and more.
DNS Record Reference
Searchable cheat sheet for DNS record types — A, AAAA, CNAME, MX, TXT, NS, SOA, PTR, SRV, CAA, DNSSEC, SVCB / HTTPS — with examples.
Subnet Calculator (IPv4 / CIDR)
Parse an IPv4 CIDR into network address, broadcast, netmask, wildcard, host range, and class. Shows binary breakdown and private/public status.
User Agent Parser
Parse a User-Agent string into browser, engine, OS, device, and CPU. Detects 20+ bots including GPTBot, ClaudeBot, PerplexityBot.
HTTP Status Code Reference
Searchable list of every HTTP status code (1xx-5xx) with summary, RFC, when to use, and common pitfalls.