---
title: "Slugify action for ActionClip"
canonical_url: "https://actionclip.app/actions/slugify"
document_type: "standalone_action"
official: true
action_count: 1
catalog_schema_version: 1
catalog_revision: "2026-08-21.1"
catalog_published_at: "2026-08-20T18:50:00Z"
---

# Slugify action for ActionClip

Turn selected text into a readable URL slug.

## What it does

Slugify turns a phrase into clean, web-friendly text: it uses lowercase letters, removes accents, and joins words with hyphens.

## Action details

| Field | Value |
| --- | --- |
| Category | Text Tools |
| Result | Replaceable text |
| Execution | Local JavaScript sandbox |
| Setup | None |
| Internet | Not required |

## Example

| Selected text | Result |
| --- | --- |
| Café + APIs & SDKs | `cafe-plus-apis-and-sdks` |

## How to turn selected text into a readable URL slug with ActionClip

1. Select a heading, phrase, or label in an editable Mac app.
2. Choose **Slugify** from ActionClip.
3. Replace the selection or copy the transformed result.

## Requirements and privacy

- No setup is required.
- The action runs locally in ActionClip.
- Selected text does not leave the Mac.

## JavaScript source

```javascript
function run(selected_text) {
  return selected_text
    .normalize("NFKD")
    .replace(/[\u0300-\u036f]/g, "")
    .toLowerCase()
    .replace(/\./g, "-dot-")
    .replace(/\+/g, "-plus-")
    .replace(/&/g, "-and-")
    .replace(/@/g, "-at-")
    .replace(/_/g, "-")
    .replace(/[^a-z0-9\s-]+/g, "")
    .replace(/[\s-]+/g, "-")
    .replace(/^-+|-+$/g, "");
}
```

## Links

- [HTML listing](https://actionclip.app/actions/slugify)
- [Download action definition](https://actionclip.app/actions/slugify.actionclip)
- [Browse Text Editing & Formatting actions](https://actionclip.app/marketplace#marketplace-textTools)
- [All Marketplace listings](https://actionclip.app/marketplace)
