Unicode Text Normalizer
text.normalize_unicode
Overview
Normalizes Unicode text using NFC, NFD, NFKC, or NFKD forms. Optionally applies case folding, whitespace collapsing, trimming, and diacritic removal. Reports whether the text changed, code point counts, and which operations were applied. Accepts file input via file_ref — no need to extract file content first.
Visually identical text can have multiple Unicode representations — we canonicalize yours so comparison, hashing, and deduplication stay reliable.
Reliability
STRICT and deterministic — same text and options always yield the same normalized output per the Unicode Standard. Output over 100 KB is stored as a file automatically, and outputToFile lets you force that for smaller results too. Input validation (not retryable): a form outside NFC, NFD, NFKC, NFKD; neither text nor file_ref; both text and file_ref; text longer than 1,048,576 characters.
Context footprint
Accepts inline text up to ~1M chars or file input via file_ref (up to 2 MB). Normalized output exceeding 100 KB is automatically stored as a downloadable file. Upload files via POST /v1/files/upload before passing file_ref; download output via the returned download_url. A successful call costs 1 execution credit.
When to use it
When you merge text from multiple sources and need a canonical form before compare, hash, deduplicate, or store.
Do not use for encoding detection or mojibake repair, language translation, or when text is already known to be in the target form.
Scope
Non-goals
- Does not translate text
- Does not detect language
- Does not detect or repair broken encoding (mojibake)
Properties
Capabilities
Cost & billing
Flat rate per invocation
File handling
File limits
Constraints this skill applies to your input and generated files. The “Limited by” column shows the static source of each cap; none of these can be raised by upgrading your plan.
| Limit | Value | Limited by |
|---|---|---|
| Maximum size per input file | 1.9 MiB | Skill maximum |
How we handle your data
What this means
This skill may receive sensitive content and may return submitted, transformed, extracted, or reformatted content.
Squillify guarantees
- Runs inside Squillify
- This skill runs inside Squillify.
- Payloads are not sent to an external service by this skill.
- Squillify does not permanently store submitted payloads.
- Telemetry records metadata only, not submitted content.
- Submitted payloads are not used for training.
- Submitted payloads are not reviewed by humans.
- This skill does not target sensitive data.
- The response may contain submitted or transformed content.
Your responsibility
Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.
Input schema
| Field | Type | Required | Description |
|---|---|---|---|
| text | string | No | Bounded inline text source. Required unless file_ref is provided. |
| file_ref | string | No | Tenant-scoped opaque text-file reference. Omit it to use the required inline text; never send both. |
| form | string | No | Unicode normalization form; omit it for NFC. |
| caseFold | boolean | No | Whether Unicode case folding is applied; omit it for false. |
| trim | boolean | No | Whether outer whitespace is removed; omit it for false. |
| collapseWhitespace | boolean | No | Whether repeated whitespace collapses; omit it for false. |
| removeDiacritics | boolean | No | Whether combining marks are removed; omit it for false. |
| outputToFile | boolean | No | Whether a large result is stored as a file; omit it for false. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| text | string | No | Normalized inline text when returned inline. |
| file_ref | string | No | Stored normalized-text reference when returned by file. |
| download_url | string | No | Temporary platform download URL when returned by file. |
| size_bytes | integer | No | Returned UTF-8 byte size. |
| changed | boolean | Yes | Whether any requested operation changed the text. |
| inputCodePoints | integer | Yes | Original Unicode code-point count. |
| outputCodePoints | integer | Yes | Returned Unicode code-point count. |
| appliedOperations | array | Yes | Bounded array of applied operation names in deterministic execution order. The item shape is defined by the nested schema and the array contains from 1 through 8 items. |
| offsetsPreserved | boolean | Yes | Whether source character offsets remain valid. |
API contract
POST /v1/executecurl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"text.normalize_unicode","input":{"text":"café","form":"NFC","caseFold":true}}'import { Squillify } from "@squillify/sdk";
const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });
const { output } = await sq.execute("text.normalize_unicode", {"form":"NFC","text":"café"});Errors
| Code | HTTP | Retryable | Description |
|---|---|---|---|
| VALIDATION_ERROR | 400 | No | The request payload failed schema validation. |
| UNAUTHORIZED | 401 | No | Missing or invalid API key. |
| SKILL_NOT_ACCESSIBLE | 403 | No | The API key is not granted access to this skill. |
| SKILL_NOT_AVAILABLE_FOR_PLAN | 403 | No | This skill is not included in your current plan. |
| PLAN_ELIGIBILITY_UNAVAILABLE | 503 | Yes | Plan eligibility could not be decided. Retry after backoff. |
| SKILL_NOT_FOUND | 404 | No | The requested skill or version does not exist. |
| TENANT_RATE_LIMITED | 429 | Yes | Request rate limit exceeded. Retry after backoff. |
| QUOTA_EXCEEDED | 429 | Yes | Plan quota exhausted. Retryable once the quota period resets. |
| EXECUTION_TIMEOUT | 504 | Yes | Execution exceeded the allowed time budget. |
Other limits
| Limit | Value |
|---|---|
| Recommended inline bytes | 32 KiB |
Limitations
- Does not translate text
- Does not detect language
- Does not detect or repair broken encoding (mojibake)
- Translating between languages
- Detecting character encoding
- Repairing mojibake or broken encodings
How to call
POST /v1/execute (requires authentication)
{
"skillKey": "text.normalize_unicode",
"input": {
"form": "NFC",
"text": "café"
}
}Examples
NFC normalize accented text
{
"form": "NFC",
"text": "café"
}{
"inputCodePoints": 5,
"text": "café",
"outputCodePoints": 4,
"changed": true,
"offsetsPreserved": false,
"appliedOperations": [
"normalize:NFC"
]
}Remove diacritics for search
{
"text": "Résumé",
"form": "NFD",
"removeDiacritics": true
}{
"inputCodePoints": 6,
"text": "Resume",
"outputCodePoints": 6,
"changed": true,
"offsetsPreserved": true,
"appliedOperations": [
"normalize:NFD",
"removeDiacritics"
]
}Recommended use cases
- Normalize text before comparison or deduplication
- Prepare text for consistent hashing
- Remove diacritics for simplified search
- Canonicalize user input before database storage
Avoid for
- Translating between languages
- Detecting character encoding
- Repairing mojibake or broken encodings
Related skills
Composable with
Safety & privacy
- Runs without calling any external service.
- Your payloads are never stored permanently.
- Telemetry captures metadata only — never your payload contents.
- We never train models on your payloads.
- No human reviews your payloads.