# HYPERLINK in Google Sheets: syntax and examples

URL: https://goingstellar.ro/reference/sheets/hyperlink/

HYPERLINK turns a cell into a clickable link and shows the label you pick. The url can be typed, read from a cell or built with the & operator.

## Syntax

```
HYPERLINK(url, [link_label])
```

## Arguments

- `url` (text, required: yes): The address to open, with the https:// part. It can also point inside the file, such as "#gid=0".
- `link_label` (text, required: no): The text shown in the cell. If left out, the cell shows the url itself.

## Examples

The examples use this table, starting in A1:

| Link | Query | Email |
|---|---|---|
| https://example.com | desk lamp | ana@example.com |

```
=HYPERLINK("https://www.google.com", "Google")
```

Result: `Google`

A clickable cell that shows a short label instead of the address. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=HYPERLINK(A2, "Open site")
```

Result: `Open site`

The url comes from another cell, so one column of links can be reused. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=HYPERLINK("https://www.google.com/search?q="&ENCODEURL(B2), "Search "&B2)
```

Result: `Search desk lamp`

A search link built from a cell. ENCODEURL turns the space into %20. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=HYPERLINK("mailto:"&C2, C2)
```

Result: `ana@example.com`

A mailto link: a click opens the mail program with the address filled in. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=HYPERLINK("#gid=0&range=A1", "Back to A1")
```

Result: `Back to A1`

An internal link to a cell of the same file, using the gid of the tab. Run in a Google Sheet (English US locale) on 2026-11-29.

## Common errors

- Without link_label the cell shows the whole url. Add a short label for a clean sheet.
- The value of the cell is the label, not the url. A formula such as LEN or a lookup on that cell sees the label text only.
- Query values with spaces or accents should go through ENCODEURL, which turns a space into %20.
- The url argument is required. Calling HYPERLINK with no arguments returns #N/A.

## Compared with Excel

Same syntax as Excel HYPERLINK. Internal links use "#gid=0" in Sheets and "#Sheet1!A1" in Excel.

## Related functions

- [IMAGE](https://goingstellar.ro/reference/sheets/image/)
- [CONCATENATE](https://goingstellar.ro/reference/sheets/concatenate/)
- [IFERROR](https://goingstellar.ro/reference/sheets/iferror/)
- [IMPORTDATA](https://goingstellar.ro/reference/sheets/importdata/)

## Sources

- [HYPERLINK (Docs Editors Help)](https://support.google.com/docs/answer/3093313)

