uri-template is a Common Lisp implementation of the URI Template proposed standard draft version 01 as a reader macro, used for both creating and parsing URIs.

Example use explains the concept best:

(let ((foo 1))

          => "http://www.example.com/widget/1/parts"

          (uri-template-bind (#Uhttp://www.example.com/{part}/{number})
          (list part (parse-integer number) %uri-host))

          => ("widget" 1 "www.example.com")

Although uri-template does not implement the operators introduced in the 02 and later drafts of the URI Template standard, it does allow arbitrary Lisp expressions in template placeholders, which gives simpler and more powerful templates.


The latest version of uri-template is 1.3, and can be downloaded here. Older versions can be downloaded from the release directory.

uri-template is available via Quicklisp: (ql:quickload :uri-template)


Documentation is provided in the README file included with the distribution.

Source repository


Parenscript integration

uri-template works with Parenscript to provide template interpolation for JavaScript. To enable this functionality, load Parenscript before loading uri-template. Note that destructuring is currently unsupported for Parenscript.

Mailing list

Subscription information and mailing list archives are available at: https://common-lisp.net/cgi-bin/mailman/listinfo/uri-template-devel


Please send patches and bug reports to the mailing list: uri-template-devel@common-lisp.net


uri-template is authored by Vladimir Sedach.


uri-template is distributed under the terms of GNU Lesser General Public License version 3 or any later version.