shorten icon indicating copy to clipboard operation
shorten copied to clipboard

A public url shortener โค๏ธ ๐ŸŒŽ ๐Ÿ—œ๏ธ.

FormKit Url Shortener ๐Ÿ—œ๏ธ

This is a public url shortener built with UnJSโ€™s excellent Nitro server server. Anyone is welcome to use it free of charge โค๏ธ. You can use it to shorten any url, and in general we (the FormKit team) will try to keep these short urlโ€™s alive.

Usage

To shorten a URL perform a post request to https://formk.it with the url youโ€™d like to shorten in the body (this can be plain text or a JSON object with a "url" property):

curl -X POST -d "https://www.youtube.com/watch?v=10q09MMqU9E" https://www.formk.it
# https://formk.it/b4fa31ffi2xzf3fmv02czq0

Your own shortener

You can of course run your own shortener, and we encourage you to do so.

npx giget@latest gh:formkit/shorten my-shortener-app

Youโ€™ll need to provide your own Nitro storage adapter credentials (we use Vercelโ€™s KV store)

// nitro.config.ts
export default defineNitroConfig({
  storage: {
    kv: {
      driver: "vercelKV", // ๐Ÿ‘€ your storage adapter
    },
  },
});

Finally use a .env file with the appropriate environment variables for your adapter.

Notice

If you chose to use the formk.it public shortener, please be aware that we cannot guarantee the longevity of the short urls. We will try to keep them alive, but we may need to remove them at any time. If you need a short url that will never change, please run your own shortener.