Notion Page to Valibot

Paste a notion page JSON payload and get a Valibot v.object schema you can run inside your handler. Smaller bundle than Zod, same boundary guarantee — useful for Cloudflare Workers, Vercel Edge, and any runtime where bundle size matters.

JSON input valid
Valibot output

      
    

About this conversion

Notion's page object is tagged-union heavy (every property carries its own type discriminator) and the database schema can change without warning. A parse turns a property type change (number→formula, multi_select→relation) into a named validation error instead of a silently-wrong sync.

If you embed Notion content into a SPA or static site (Next.js static export, Astro), validating the shape at fetch time keeps the client robust to upstream schema drift; Valibot is the right pick because the client-shipped bundle is part of your LCP budget. The output is a copy-paste-runnable v.object using the canonical namespace import (import * as v from "valibot"); only the primitives your shape actually uses (v.string, v.number, v.array, v.union, v.optional) get pulled in.

Same shape, other validators

Other JSON shapes