Decurl
Type-safe state management for URL search params

Turn string, string[], and null into typed, maintainable, and reviewable business state with explicit decode pipelines.

FieldCodec

Describe a URL key, decode logic, default value, write-back behavior, and equality semantics with a single field.

Decode first

The hard part of URL search params is not writing values, but safely decoding raw URL strings into business values.

TypeScript-first

Search Fields describe URL fields and infer value types, so hooks, codecs, and business code share the same constraints.

Patch encode

When updating the URL, only encode the fields in the patch and preserve untouched params from the base search.

React Router integration

Expose search state as hooks in React Router applications, with support for optimistic URL updates.

Alias migration

Read legacy keys from old links and write back canonical keys, making URL field migrations smoother.