How It Works
A short link is a small, easy-to-share address that forwards visitors to a longer one. Here is how to create one, how to share text or code, and how to use IHTli from the command line.
Shorten a URL
- Copy the long URL from your browser's address bar.
- Paste it on the home page and press Shorten. If you leave out
https://we add it for you. - Copy your short link with the Copy button. The QR code button shows a scannable code you can download as an SVG image.
Your recent links stay listed on the home page, saved only in your own browser. There are no accounts.
Share text or code
Open the Paste tab, paste your text, optionally choose a language for syntax highlighting, and press Create paste. You get a short page address you can share. Tick Private paste to protect it with a password. Pastes can be viewed as Raw text or downloaded as a file.
Use it from the command line
No account or API key is needed. These examples use curl; any HTTP client works. The answer is the new address as plain text (add legacy=1 only if an old script needs the former //host/code format).
Shorten a URL
# plain text answer curl -s -d "url=https://example.com/a/very/long/link" https://iht.li/add_url.php # URL with special characters: let curl encode it curl -s --data-urlencode "url=https://example.com/search?q=hello world&page=2" https://iht.li/add_url.php # JSON answer: {"ok":true,"hash":"…","short_url":"…"} curl -s -H "Accept: application/json" -d "url=https://example.com/long" https://iht.li/add_url.php # GET variant (old interface, still supported) curl -s -G --data-urlencode "url=https://example.com/long" https://iht.li/add_url_get.php
Share text or code
# a short message curl -s -d "text=Hello from the terminal" https://iht.li/add_paste.php # a file, with language and title curl -s --data-urlencode "[email protected]" -d "language=python" -d "title=My script" https://iht.li/add_paste.php # pipe any command into a paste dmesg | tail -50 | curl -s --data-urlencode "text@-" https://iht.li/add_paste.php # private paste (password protected), JSON answer curl -s -H "Accept: application/json" --data-urlencode "[email protected]" -d "private=1" -d "password=choose-a-password" https://iht.li/add_paste.php
| Field | Used by | Meaning |
|---|---|---|
url | add_url | The address to shorten (http or https, up to 2048 characters). |
text | add_paste | The text to share (UTF-8, up to 512 KB). |
language | add_paste | Optional. text (default), php, python, javascript, bash, sql, c, cpp, java and about a hundred more (see the list on the Paste tab). |
title, author | add_paste | Optional labels (max 80 and 50 characters). |
private, password | add_paste | Optional. private=1 requires a password of at least 4 characters. |
Errors use normal HTTP codes with a readable message: 422 invalid input, 429 too many requests (see the Retry-After header), 403 for requests that a browser sends from another website. To keep the service free of spam, each network may create up to 8 links per minute and 30 per hour, and 10 pastes per hour and 40 per day. Please do not use the service for automated bulk creation.
What happens when someone opens a short link?
The browser asks our server for the short code. We look up the original address, check that it is still allowed, and answer with a standard HTTP redirect (status 302). The browser then loads the original page. The destination page itself is never altered.
What we accept, and what we refuse
- Addresses that start with
http://orhttps://. - Other schemes such as
javascript:,data:,file:orftp:are refused. - Addresses with a user name or password in them, private network addresses, and addresses that point back to this service are refused.
Short links hide the destination, so a few words of context help people trust yours. If you find a link that leads to phishing, malware or spam, please report it.
Frequently asked questions
Is this URL shortener really free?
Yes. You can shorten links and share text without creating an account or paying anything.
Do short links expire?
We do not set expiry dates on links. We may disable a link if it breaks our terms, for example if it is reported for phishing or malware.
Can I choose my own custom short link?
Not at the moment. Short codes are generated randomly, which also keeps them hard to guess.
Can I change or delete a link after creating it?
Links cannot be edited because there are no accounts. If a link was created by mistake, create a new one. To request removal of a link or paste, use the report form.
How can I tell if a short link is safe?
Only open short links from people you trust. If a link arrives unexpectedly, ask the sender what it points to, and report anything suspicious to us.
Who can read my private paste?
Only people who have both the paste address and its password. Never paste secrets you cannot afford to lose.