a little site for short links

yourls.site - API

Learn More

Usage

yourls.site: a free URL shortener. No sign-up and no API token.

Make a link. The answer is the short link on one line:

    https://www.yourls.site/create?u=https://example.com/a/long/address

From a shell:

    curl -G https://www.yourls.site/create --data-urlencode 'u=https://example.com/page?a=1&b=2'
    curl https://www.yourls.site/create -d 'u=https://example.com/a/long/address'

Pick the short name yourself, 1 to 64 letters, digits, - or _:

    https://www.yourls.site/create?alias=my-name&u=https://example.com/a/long/address

As JSON:

    https://www.yourls.site/create?format=json&u=https://example.com/a/long/address
    curl https://www.yourls.site/create -H 'Accept: application/json' -d 'u=https://example.com/page'

Follow a link, or see where it leads without going there:

    https://www.yourls.site/<code>         redirects
    https://www.yourls.site/<code>+        the address as text
    https://www.yourls.site/<code>.json    the address and when the link was made

Put u last, or percent-encode it: an address written out as it is
runs to the end of the line, with its own ? and & in it.

The same address gives the same short link every time, unless you name
it yourself. A name that is taken answers 409. Links do not expire.
Made with Sitekrafter Site Builder. Create your free site today.