# How to shorten a link: on the web, with an API or with AI

> Learn how to shorten a link in seconds on the web, with one API call or by asking your AI assistant, plus custom endings and tips for short links people trust.

Source: https://blinkhop.com/guides/how-to-shorten-a-link

To shorten a link, paste the long URL into a link shortener, choose a custom ending if you want one, and copy the short link it gives you. With Blinkhop, that takes a few seconds on blinkhop.com, one request to the API or one sentence to your AI assistant. This guide shows how to shorten a link all three ways, how custom endings work and how to make short links that people trust.

## Before you start: get the right long URL

A short link is only as good as the address behind it. Take a minute to check yours:

- **Copy the full URL from the address bar**, including `https://`.
- **Open it once** to make sure it shows the page you expect, not a login screen, a cart or an error page.
- **Add tracking first.** If you measure campaigns, add UTM parameters to the long URL before you shorten it, for example with the free [UTM builder](https://blinkhop.com/tools/utm-builder). The short link then carries them on every click.
- **Decide on the ending.** A random code like `zou.sh/7Kp2x` is fine for chat and email. A readable ending like `zou.sh/spring-menu` works better for print, slides and anything people type by hand.

## How to shorten a link on the web

Blinkhop's web shortener works without an account, without ads and without captchas, including over Tor and VPNs.

1. Copy the long URL.
2. Go to blinkhop.com and paste it into the empty field. That is the whole job: pasting a link into the empty field shortens it immediately.
3. The short link appears on a zou.sh address and is copied to your clipboard, ready to paste into a message, a post or a document.
4. Use the **QR** button if you need a code for print, or **New** to shorten another link.

To pick your own ending, open the **Custom ending** option before you paste, type the ending after `zou.sh/`, paste the URL, then select **Shorten**.

Here is what the result looks like:

| Link | Example |
|---|---|
| Long URL | `https://example.com/restaurants/lisbon/menus/2026-spring-tasting-menu?ref=homepage` |
| Short link with a random code | `https://zou.sh/7Kp2x` |
| Short link with a custom ending | `https://zou.sh/spring-menu` |

Both short links send visitors to the long URL with a standard HTTP redirect. They never expire unless an owner sets an expiry date, an option that comes with accounts (early access). If you plan to print the link, read [how to make a QR code for a link](https://blinkhop.com/guides/qr-code-for-a-link) before you send anything to the printer.

## How to shorten a link with the API

Developers can create the same links from code. The REST API needs no key to try. Send the long URL as JSON:

```bash
curl -s https://api.blinkhop.com/v1/links \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/restaurants/lisbon/menus/2026-spring-tasting-menu"}'
```

The response describes the new link, including its QR code and preview page:

```json
{
  "id": "lnk_7Kp2x",
  "code": "7Kp2x",
  "short_url": "https://zou.sh/7Kp2x",
  "url": "https://example.com/restaurants/lisbon/menus/2026-spring-tasting-menu",
  "qr_url": "https://zou.sh/7Kp2x/qr",
  "preview_url": "https://zou.sh/7Kp2x+",
  "clicks": 0,
  "created_at": "2026-10-11T14:02:11Z"
}
```

A few details are worth knowing:

- Add `"alias": "spring-menu"` to the JSON body to choose the ending.
- The API returns HTTP 201 for a new link and HTTP 200 when the same URL already had one. Without a custom ending, shortening the same URL again returns the existing link instead of creating a duplicate.
- Add `?format=text` to get only the short URL back, which is handy in shell scripts. The `--data-urlencode` option sends the URL as a form field and encodes any `&` or `?` it contains:

```bash
curl -s "https://api.blinkhop.com/v1/links?format=text" \
  --data-urlencode "url=https://example.com/restaurants/lisbon/menus/2026-spring-tasting-menu"
```

Without a key, you can create 20 links per minute and 300 per day per IP address. The [API reference](https://blinkhop.com/docs/api) lists every endpoint, including bulk shortening of up to 100 URLs in one request.

## How to shorten a link with an AI assistant

If you work in Claude, ChatGPT, Cursor, VS Code or Windsurf, your assistant can create links for you through Blinkhop's MCP server. MCP, short for Model Context Protocol, is an open standard that lets AI assistants use outside tools. Add this server URL to your client once:

```text
https://mcp.blinkhop.com/mcp
```

In Claude Code, for example, one command does it:

```bash
claude mcp add --transport http blinkhop https://mcp.blinkhop.com/mcp
```

Then ask in plain language:

- "Shorten https://example.com/restaurants/lisbon/menus/2026-spring-tasting-menu with the ending spring-menu."
- "Replace every link in this newsletter draft with a short link."
- "Where does zou.sh/spring-menu go, and how many clicks does it have?"

No account or key is needed. Setup steps for every client are on the [MCP server page](https://blinkhop.com/mcp).

## Custom endings: rules and examples

A custom ending, also called an alias, replaces the random code with words you choose. The rules are the same on the web, in the API and through MCP:

| Rule | Detail |
|---|---|
| Length | 3 to 40 characters |
| Allowed characters | Letters, numbers, dashes (-) and underscores (_) |
| First character | A letter or a number |
| Letter case | Ignored: `zou.sh/Spring-Menu` and `zou.sh/spring-menu` are the same link |
| Reserved words | Some words are kept for the service, such as api, admin, login, docs, help, pricing, mcp and qr |
| Availability | Each ending can belong to only one link, so if it is taken, choose another one |

Some quick checks:

- `spring-menu` works.
- `-spring` does not work, because it starts with a dash.
- `qr` does not work: it is reserved, and it is too short anyway.
- `spring menu` does not work, because spaces are not allowed. Use a dash instead.

When you skip the custom ending, Blinkhop generates a 5-character code from an alphabet without look-alike characters, so codes never contain 0, O, 1, l or I, which are easy to confuse. Lookups ignore letter case, so a code still works if someone types it in lowercase. The [custom links page](https://blinkhop.com/features/custom-links) has more examples.

## Shorten many links at once

Shortening links one by one is fine for a single post. For a newsletter, a product catalog or a migration, use one of these instead:

- **The bulk API.** `POST /links/bulk` takes up to 100 URLs in one request and returns one result per URL: a short link, or an error explaining why that URL was refused. Each URL counts toward your rate limit.
- **Your AI assistant.** The MCP server's `shorten_links` tool handles up to 50 URLs in one call, so "shorten every link in this draft" works in a single step.
- **CSV upload.** Uploading a spreadsheet of links comes with accounts, which are in early access.

The [bulk shortening page](https://blinkhop.com/features/bulk) has more details.

## Why a link might be refused

Blinkhop checks every destination before it creates a link. If something goes wrong, the website shows a message and the API returns an error code. These are the most common ones:

| Error code | What it means | What to do |
|---|---|---|
| `invalid_url` | The text is not a valid web address | Copy the full URL again, including `https://` |
| `already_short` | The URL is already a zou.sh link | Share the existing link as it is |
| `unsafe_destination` | The destination is on the phishing and malware blocklist | Do not share it |
| `invalid_alias` | The custom ending breaks the rules above | Use 3 to 40 letters, numbers, dashes or underscores |
| `alias_taken` | Another link already uses that ending | Pick a different ending |
| `rate_limited` | Too many new links in a short time | Wait a moment, then try again |

Links with embedded credentials, such as `user:pass@` in the address, and links to private or local network addresses are refused too. The blocklist covers about 390,000 phishing and malware domains and is refreshed every night.

## Tips for short links people trust

People hesitate before clicking a link when they cannot tell where it goes. These habits help:

1. **Say where the link goes.** Write "Spring menu: zou.sh/spring-menu" rather than a bare link.
2. **Use readable endings for anything spoken, printed or typed.** Keep them short, lowercase and specific, with dashes between words.
3. **Shorten the final URL, not another short link.** Chains of shorteners hide the destination and add extra hops. Blinkhop refuses to shorten a zou.sh link.
4. **Tag before you shorten.** Add UTM parameters to the long URL, then shorten it, so every click arrives tagged.
5. **Test before you share.** Open the short link once, or add + to the end, as in `zou.sh/spring-menu+`, to see the destination, creation date and total clicks without visiting the page.
6. **Use one link per placement.** To compare a newsletter with a social post, give each its own tagged URL and its own short link.
7. **Keep a simple record.** Note which short link went where. When in doubt later, the + preview page tells you the destination of any zou.sh link.

## Key takeaways

- On blinkhop.com, pasting a link into the empty field shortens it immediately and copies the result to your clipboard.
- The API needs no key to try: a POST to `https://api.blinkhop.com/v1/links` returns a zou.sh link, a QR code URL and a preview URL.
- AI assistants can shorten links through the MCP server at `https://mcp.blinkhop.com/mcp`.
- Custom endings use 3 to 40 letters, numbers, dashes or underscores, and letter case is ignored.
- The same URL returns the same short link unless you set a custom ending.
- Add + to any zou.sh link to check where it goes before you share or click it.

## FAQ

### Is it free to shorten a link with Blinkhop?

Yes. You can shorten links on blinkhop.com, through the API or through the MCP server without an account, within the free limits of 20 links per minute and 300 per day.

### Do short links expire?

Links on zou.sh never expire unless an owner sets an expiry date. Expiry dates are an account feature, currently in early access.

### Can I choose the ending of my short link?

Yes. Custom endings use 3 to 40 letters, numbers, dashes or underscores and must start with a letter or a number. Letter case is ignored, so zou.sh/Spring-Menu and zou.sh/spring-menu are the same link.

### What happens if I shorten the same URL twice?

Without a custom ending, you get the same short link back instead of a duplicate. That also makes repeated API calls safe.

### Can I change where a short link points after I share it?

Editing a link's destination comes with accounts, which are in early access. Without an account, a short link always points to the URL you shortened.
