Watch nuqs at

Livestream

Features

Type-safe

End-to-end type safety between Server and Client components.

Universal

Supports Next.js (app & pages routers), React SPA, Remix, React Router, TanStack Router, and more.

Simple

A familiar React.useState-like API, that syncs with the URL.

Batteries included

Built-in parsers & serializers for common state types.

History controls

Replace or append to navigation history and use the Back button to navigate state updates.

Related queries

useQueryStates hook to manage multiple keys at once.

Client-first

Shallow updates by default, opt-in to notify the server to re-render RSCs (with throttle control).

Server cache

Type-safe search params access in nested React Server Components. No prop drilling needed.

Transition

Support for useTransition to get loading states on server updates.

Customizable

Make your own parser and serializer.

Tiny

Only 6 kB gzipped.

Tested & testable

Tested against every Next.js release. Use the provided test adapter to test your components in isolation.

Sponsors

Contributors

  • franky47
  • andreisocaciu
  • TkDodo
  • Multiply
  • neefrehman
  • tordans
  • Amirmohammad-Bashiri
  • chbg
  • I-3B
  • MRobertEvers
  • niklasbec
  • prasannamestha
  • rmarscher
  • MartinCura
  • 87xie
  • AfeefRazick
  • Agastya18
  • ahmedrowaihi
  • dopry
  • denis-sokolov
  • dmytro-palaniichuk
  • ethanniser
  • awosky
  • fuma-nama
  • hugotiger
  • iuriizaporozhets
  • cenobitedk
  • CogitoBurrito
  • Joehoel
  • destocot
  • msabramo
  • mateogianolio
  • blyme
  • miinhho
  • HunainSiddiqui
  • psdewar
  • pnodet
  • phelma
  • remcohaszing
  • rikbrown
  • aryasaatvik
  • sahilkapase
  • sebastianvitterso
  • timheerwagen
  • tylersayshi
  • weisisheng
  • rasvanjaya21
  • maslianok
  • mehm8128
  • mtlaso
  • gsaandy
  • stefan-schubert-sbb
  • teukuamru

Used by

openpanel.dev

Significant-Gravitas/AutoGPTsupabase/supabaselobehub/lobe-chatgetsentry/sentrycalcom/cal.comchatchat-space/Langchain-ChatchatGitbookIO/gitbookdiscordjs/discord.jscommunity-scripts/ProxmoxVEkarakeep-app/karakeepmastra-ai/mastralearn-anything/learn-anythingmediar-ai/screenpipeudecode/platesupermemoryai/supermemoryzaidmukaddam/sciratensorzero/tensorzeroMail-0/Zeroinstantdb/instantbaptisteArno/typebot.ioelie222/inbox-zeroopenstatusHQ/openstatushyperdxio/hyperdxmidday-ai/middaymfts/papermarkrisingwavelabs/risingwavejnsahaj/tweakcnpolarsource/polarBasedHardware/omiBoundaryML/bamllangchain-ai/chat-langchainNangoHQ/nangosadmann7/tablecnUniswap/interfacepqoqubbw/iconsKiranism/next-shadcn-dashboard-startervercel/examplesunkeyed/unkeypiotrkulpinski/openalternativeliam-hq/liamliveblocks/liveblocksredpanda-data/consoleOpenpanel-dev/openpanelAmanVarshney01/create-better-t-stackupstash/jstackpontusab/directoriesDhravya/supermemorypmndrs/uikitbestofjs/bestofjspancakeswap/pancake-frontendimskyleen/animate-uinizzyabi/Mail0diced/ziplineuseautumn/autumnlanguine-ai/languinekeenthemes/reuiperses/persesun/inboxBearStudio/start-ui-webblefnk/relivator-nextjs-templatelunary-ai/lunarywevm/vocsagno-agi/agent-uitrycompai/compBennyKok/comfyui-deploycmdcolin/awesome-genome-visualizationAnswerOverflow/AnswerOverflowlatticexyz/mudnelsonlaidev/nelsonlai.devdaangn/seed-designantiwork/flexilejoschan21/contentportbenjamintd/chronotrainstszhong0411/honghong.memaximhq/bifrostbazzalabs/uidocker/compose-for-agentsdatabuddy-analytics/Databuddylangwatch/scenariokianbazza/uithedaviddias/llms-txt-hubBlazity/enterprise-commercethirdweb-dev/jsbadass-courses/course-builderl2beat/l2beatui-layouts/ui-toolsossdotnow/ossdotnowhehehai/x-hiringAIDotNet/koala-airhinobase/honohubaifuxi/fuxiaochenplotwist-app/plotwistfreesewing/freesewingethyca/fideshypermodeinc/moduscrafter-station/text0inferablehq/inferablePrairieLearn/PrairieLearnthe-benchmarker/websitenuotsu/sanitypress
N8
N8
@nathanbrachotte

I started building my own hook helpers for handling URL states and had to deal with some performance drawbacks.

Eventually stumbled on this little beauty and it has everything I wanted and more.

It’s a database ORM for your URL
We use nuqs pretty much everywhere 🖤
kitze
kitze
@thekitze
nuqs is fkn dope
thx a lot for this awesome library! I was syncing with URL like nextjs recommends .. performance are awful and I was about to move back to useState.
KafKa
KafKa
@KafKa303
This is a great idea, way better than calling useSearchParam and cook my own stuff! nuqs is such a important last piece for app router! An extremely underrated lib!
ahmet
ahmet
@bruvimtired
nuqs has to be one of the best libraries out there. lifting state to the url is so easy now and far better for ux.
Aryan
Aryan
@AryaAmour08

Just used the nuqs library for the first time today… and wow - syncing URL query params in Next.js has never felt this elegant.

Parsing, defaults, clearOnDefault — it's pretty wild
Where has this been all my life?

Ru Chern Chong
Ru Chern Chong
@ruchernchong
Sometimes, there is no need to complicate managing state. nuqs is really powerful.
Bharat Kara
Bharat Kara
@KaraBharat
nuqs simplifies your URL logic like magic. Seriously.
Ido Evergreen
Ido Evergreen
@IdoEvergreen

It made me realize URL should be part of the design convo not just a place to dump state.

Since I started using nuqs more heavily in production, the way I see and treat URL completely changed.

Rhys Sullivan
Rhys Sullivan
@RhysSullivan
The goat library
Virgile Rietsch
Virgile Rietsch
@virgilerietsch
best library ever
Dominik Koch
Dominik Koch
@DominikDoesDev
i love nuqs
Pavel Svitek
Pavel Svitek
@pavelsvitek_
Just did first custom parser today, pretty simple .. great API design 👌