Zero Signup ToolsFree browser tools

Developer Tools

URI Template Tester

Expand RFC 6570 URI templates in your browser. All four levels, every operator, prefix and explode modifiers, list and object variables, live debug.

Sample templates

67 chars

Wrap variables in { }. Add an operator (+, #, ., /, ;, ?, or &) before the variable list to switch expansion mode. Use {var:3} for a prefix or {var*} to explode a list or object.

4 keys

Strings, numbers, and booleans become single values. Arrays become lists. Objects become key-value pairs. null and undefined values are treated as missing and skipped per RFC 6570 Section 3.2.1.

Expanded URL

https://api.github.com/users/octocat/repos?type=owner&sort=updated&direction=desc

Spec level

Level 3

Expressions

2

Variables seen

4

Used

direction, sort, type, username

Expansion breakdown

Each literal segment and expression is shown with the bytes it produced. Use this view to debug encoding, missing variables, and operator behavior.

  1. literal: https://api.github.com/users/

    output: https://api.github.com/users/

    Literal text. Copied verbatim into the output.

  2. expression: {username}

    output: octocat

    Simple: produced "octocat".

  3. literal: /repos

    output: /repos

    Literal text. Copied verbatim into the output.

  4. expression: {?type,sort,direction}

    output: ?type=owner&sort=updated&direction=desc

    Operator "?": produced "?type=owner&sort=updated&direction=desc".

Operator reference (RFC 6570)

The first character of an expression picks the operator. Operators control the separator, prefix, and which characters get percent-encoded.

OperatorLevelFirstSeparatorEncodingUse
(none)Level 1(none),Unreserved onlySimple string expansion. Values are joined by commas and percent-encoded (unreserved only).
+Level 2(none),Unreserved + reservedReserved expansion. Reserved characters (gen-delims and sub-delims) pass through unencoded.
#Level 2#,Unreserved + reservedFragment expansion. Same as + but prefixed with #.
.Level 3..Unreserved onlyLabel expansion. Each value is prefixed with a dot.
/Level 3//Unreserved onlyPath segment expansion. Each value is prefixed with a slash.
;Level 3;;Unreserved onlyPath-style parameter expansion. Each value is prefixed with a semicolon and the variable name.
?Level 3?&Unreserved onlyForm-style query expansion. The first variable is prefixed with ? and joined with &.
&Level 3&&Unreserved onlyForm-style query continuation. Same as ? but starts with & so it can extend an existing query.

Value modifiers: {var:N} keeps the first N characters of a string (Unicode-aware). {var*} explodes a list or object so each entry becomes a separate key=value pair under the current operator.

How to use

  1. Click a sample chip (GitHub user repos, GitHub search, REST resource, matrix params, label filename, fragment link, Level 1 simple, prefix modifier) to load a working template and matching variable map.
  2. Edit the URI template field. Wrap variables in curly braces and put an operator (+, #, ., /, ;, ?, or &) right after the opening brace to switch expansion mode.
  3. Edit the JSON variables panel. Strings, numbers, and booleans become single values; arrays become lists; objects become key=value pairs. Use {var:3} for prefix or {var*} to explode.
  4. Read the green Expanded URL panel for the final result and copy it with Copy URL. The Variables used and Variables missing chips show which keys were applied and which fell through.
  5. Scroll the Expansion breakdown to see each literal and expression step labeled with its operator and the bytes it produced. Use the Operator reference table at the bottom to recall what each first character does.

About this tool

URI Template Tester is a browser workbench for RFC 6570 URI templates, the syntax behind GitHub API link relations, OpenAPI server variables, OAuth 2.0 RFC 6749 authorization endpoints, JSON-HAL hypermedia links, SCIM endpoint discovery, and most modern REST hypermedia clients. The tool implements the full RFC 6570 algorithm in pure TypeScript and covers all four expansion levels. Level 1 handles simple replacement like /users/{id} where each value is percent-encoded with the unreserved character set. Level 2 adds reserved expansion {+path} (where gen-delims and sub-delims like : / ? # [ ] @ pass through unencoded) and fragment expansion {#section} (same encoding rules, prefixed with the hash). Level 3 introduces every operator developers actually use: dot label expansion {.ext} for filenames, slash path expansion {/year,month} for nested REST resources, semicolon path-style {;lat,lng} for matrix parameters, question-mark form-style {?type,sort} for query strings, and ampersand continuation {&page} to extend an existing query. Level 4 layers two value modifiers: the prefix modifier {commit:7} keeps the first N Unicode code points of a string (so multibyte characters like emoji and accented letters never split), and the explode modifier {tag*} unfolds a list into separate items or an object into key=value pairs under the active operator's separator. The variable map is supplied as JSON, so strings, numbers, and booleans become single values, arrays become lists, and objects become associative pairs. null and undefined entries are treated as missing and skipped per Section 3.2.1, exactly as a compliant server would do. The output panel shows the expanded URL, a level badge, counts of literal segments and expressions, and a per-step breakdown that names each operator and the bytes it produced, so you can debug encoding surprises (why is + showing up where %2B should be? why did my list collapse to a single comma-separated value?) without scrolling through the RFC. A curated set of sample templates loads GitHub repos, GitHub search, REST sub-resources, matrix parameters, label-based filenames, fragment anchors, simple Level 1 replacement, and the prefix modifier so you can compare results against a known-good expansion. Everything runs in this tab; the template, the variables, and every expanded URL stay on your device. Useful for API documentation authors, OpenAPI tooling, link-header hypermedia clients, SDK generators, REST clients that have to build the URL before fetch(), Apigee, Kong, AWS API Gateway, Azure API Management, Postman pre-request scripts, and anyone who has ever wondered whether {?q,page} is encoded the same way as ?q={q}&page={page} (it is not).

Free to use. Works in your browser. No signup, no login.

Related tools

You may also like

All tools
All toolsDeveloper Tools