---
title: 'Fix Meta CAPI Invalid fbc and fbp Errors'
description: 'Fix Meta Conversions API invalid fbc and fbp parameter errors: case-sensitive fbclid, raw unhashed cookies, ms timestamps, and organic traffic rules.'
canonical: 'https://plainrouter.com/library/meta-capi-invalid-fbc-fbp-error'
format: Guide
last_updated: '2026-11-24'
---

**Short answer:** Meta flags ` fbc ` or ` fbp ` as invalid (or silently ignores them for click attribution) when you break one of five rules: SHA-256 hashing them instead of sending them raw, lowercasing the case-sensitive ` fbclid ` suffix inside ` fbc `, passing a raw ` ?fbclid=... ` query string without the ` fb.1.<timestamp_ms>. ` prefix, putting Unix seconds instead of milliseconds in the 3rd segment, or fabricating an ` fbc ` value for visitors who did not arrive from a Meta ad click.

Both parameters follow a strict four-part dot-delimited structure:

```text
_fbp format: fb.<subdomain_index>.<creation_time_ms>.<random_number>
_fbc format: fb.<subdomain_index>.<creation_time_ms>.<fbclid>
```

## 1\. Sending SHA-256 hashed \`fbp\` or \`fbc\` (must be raw)

Meta requires PII (` em `, ` ph `, ` fn `, ` ln `, ` ct `, ` st `, ` zp `, ` country `, ` external_id `) to be SHA-256 hashed, while **\`fbp\`, \`fbc\`, \`client\_ip\_address\`, and \`client\_user\_agent\` must never be hashed**. If a generic serializer hashes every key in ` user_data `, Meta rejects or drops the click and browser identifiers.

```json
// Broken: fbp and fbc were SHA-256 hashed
{
  "user_data": {
    "fbp": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "fbc": "4b227777d4dd1fc61c6f884f48641d02b4d121d3fd328cb08b5531fcacdabf8a"
  }
}
```

```json
// Fixed: raw _fbp and _fbc values with intact case-sensitive fbclid
{
  "user_data": {
    "fbp": "fb.1.1732469000000.1834267592",
    "fbc": "fb.1.1732469000000.IwAR2xY9aBcDeFgHiJkLmNoPqRsTuVwXyZ"
  }
}
```

## 2\. Lowercasing the \`fbclid\` suffix or sending raw \`fbclid\`

Unlike email addresses and names, the ` fbclid ` click identifier is **case-sensitive**. Calling ` .toLowerCase() ` across all ` user_data ` strings silently breaks ` fbc ` click matching. Likewise, copying ` ?fbclid=IwAR2... ` directly into ` user_data.fbc ` without wrapping it as ` fb.<subdomain_index>.<creation_time_ms>.<fbclid> ` triggers Meta's invalid ` fbc ` format diagnostic.

```javascript
// Safe helper to build _fbc from a landing URL containing ?fbclid=...
export function buildFbcFromUrl(urlString, nowMs = Date.now(), subdomainIndex = 1) {
  const url = new URL(urlString);
  const fbclid = url.searchParams.get("fbclid");
  if (!fbclid) return undefined; // Organic visit: omit fbc completely
  return `fb.${subdomainIndex}.${Math.floor(nowMs)}.${fbclid}`;
}
```

## 3\. Unix seconds instead of milliseconds in segment 3

Confusingly, Meta CAPI uses **Unix seconds** for top-level ` event_time ` (` 1732470000 `), but **Unix milliseconds** (13 digits) for the creation timestamp inside ` _fbp ` and ` _fbc ` (` 1732470000000 `). If you pass a 10-digit timestamp inside ` fbc `, Events Manager flags a malformed parameter.

## 4\. Fabricating \`fbc\` on organic visits or mismatched subdomains

- **Never synthesize \`fbc\` without an \`fbclid\`:** If a visitor arrived from Google Search or direct traffic and has no ` _fbc ` cookie and no ` ?fbclid= ` query parameter, omit ` user_data.fbc ` completely. Sending fake placeholders hurts Event Match Quality.
- **Check \`subdomain\_index\`:** Use ` 1 ` for root domains (` example.com `), ` 2 ` for one subdomain level (` shop.example.com `). Do not pass ` 0 ` unless you are running on a bare TLD.
- **Avoid wrapping \`fbp\` or \`fbc\` in arrays:** While hashed PII keys like ` em ` and ` ph ` accept string arrays, ` fbp ` and ` fbc ` are single strings.

## Quick diagnostic table

| Invalid pattern | Why Meta flags it | Fix |
| --- | --- | --- |
| 64-char hex string in ` fbp ` or ` fbc ` | Accidentally SHA-256 hashed | Send the raw cookie value unhashed |
| ` IwAR2... ` with no ` fb.1.<ms>. ` prefix | Sent raw query param instead of ` _fbc ` format | Format as ` fb.1.<creation_time_ms>.<fbclid> ` |
| All-lowercase ` fbclid ` segment | Global ` .toLowerCase() ` broke case sensitivity | Preserve exact query-string casing for ` fbclid ` |
| 10-digit timestamp in segment 3 | Used Unix seconds instead of milliseconds | Use 13-digit ` Date.now() ` milliseconds inside ` fbp `/` fbc ` |
| ` fbc: "" ` or ` "null" ` on organic visits | Sent empty/placeholder value instead of omitting key | Delete ` fbc ` from ` user_data ` when absent |

For the complete lifecycle of how ` _fbp `, ` _fbc `, and ` fbclid ` work across browser and server, read [fbp vs fbc vs fbclid](</library/fbp-fbc>) and [Meta CAPI HTTP 400 error codes](</library/meta-capi-http-400-error-codes>). If you want automated first-party identifier capture and delivery verification without hand-rolling cookie parsers, see [Plainrouter Signals](</product/signals>) and [verify Signals ingestion](</docs/signals/verify-ingestion>).

## Frequently asked questions

### Should \`fbp\` and \`fbc\` ever be hashed before sending to Meta CAPI?

No. Meta explicitly lists ` fbp `, ` fbc `, ` client_ip_address `, and ` client_user_agent ` as do-not-hash fields. Hashing them makes them unreadable for Meta's click and browser matching.

### What if a visitor has \`\_fbp\` but no \`\_fbc\` cookie?

That is completely normal for organic, direct, email, or non-Meta referral traffic. Send ` fbp ` and omit ` fbc ` from ` user_data `.

### Does \`fbc\` expire after the first page view?

When stored in a first-party ` _fbc ` cookie (or server session tied to the checkout), keep it for up to 90 days unless a newer ` ?fbclid= ` click overwrites it. Never overwrite an existing valid ` _fbc ` with an empty value on subsequent page views.
