# Modifiers

Transform placeholder values with pipe modifiers.

Modifiers transform a placeholder's value. Apply them with `|` after the placeholder:

```
{clipboard | uppercase}
{selection | trim}
{date | lowercase}
```

Chain multiple modifiers — they're applied left to right:

```
{clipboard | trim | lowercase}
```

## Available modifiers

| Modifier | Effect | Example |
|---|---|---|
| `uppercase` | Convert to ALL CAPS | `hello` → `HELLO` |
| `lowercase` | Convert to all lowercase | `HELLO` → `hello` |
| `trim` | Remove leading and trailing whitespace | `" hi "` → `"hi"` |
| `percent-encode` | URL percent-encode the value | `hello world` → `hello%20world` |
| `json-stringify` | JSON-encode the value — wraps in quotes, escapes quotes and newlines | `say "hi"` → `"say \"hi\""` |
| `raw` | Prevent automatic URL encoding (quick links only) | — |
| `capitalcase` | Capitalizes the first letter of each word (rest lowercased). Alfred alias: `capitals` | `hello world` → `Hello World` |
| `reverse` | Reverse the string by Unicode grapheme clusters | `café` → `éfac` |
| `stripdiacritics` | Remove accents and diacritical marks via NFD normalization | `café` → `cafe` |
| `stripnonalphanumeric` | Remove all characters that are not letters or digits (whitespace, emoji, punctuation) | `Hello, World!` → `HelloWorld` |

### `raw` modifier

In quick link templates, Nibit automatically percent-encodes placeholder values to keep URLs valid. Use `raw` to opt out when the value is already encoded or should be passed through as-is:

```
https://example.com/search?q={clipboard | raw}
```

### `percent-encode` vs `raw`

- Use `percent-encode` when you want explicit encoding of a value in a quick link or snippet
- Use `raw` to disable the automatic encoding that quick links apply by default

### Common chaining patterns

**Slugify** (convert any text to a URL-safe slug):

```
{clipboard | stripdiacritics | stripnonalphanumeric | lowercase}
```

`"São Paulo 2025!"` → `"saopaulo2025"`
