Skip to content

normalizr

A small JavaScript library that flattens nested JSON data into entities and IDs using a schema.

Stars
20.8k
Forks
852
Licence
MIT
Language
JavaScript
Last update
4.6 years ago
Type
Library

This repository is archived and no longer maintained.

What it is

Normalizr takes nested JSON, such as an API response with users inside posts inside comments, and reshapes it into flat lookup tables keyed by ID, following a schema you define. It is commonly used with Redux to store API data in a predictable way. The project's README says it is no longer maintained, though it is described as stable.

  • Convert a nested API response into separate entity tables for users, posts, and comments
  • Store normalized API data in a Redux state tree
  • Look up related records by ID instead of traversing nested objects

Great for

  • JavaScript developers who receive deeply nested API responses and want flat, ID-keyed data
  • Teams already using Redux or a similar state store who want a normalized state shape
  • Projects that only need the existing stable release and do not expect new features

Not ideal for

  • Anyone who needs new features or bug fixes, because the README says the project is no longer maintained and suggests forking
  • Teams starting a new long-lived project that needs active upstream support
  • Non-JavaScript environments, since the project is a JavaScript library

How to get it

  1. 1

    Install with a package manager

    You'll need: Node.js and npm or yarn

    Install from npm

    npm install normalizr
  2. 2

    Run it

    • Define schemas for each entity type using the library's schema definitions
    • Call normalize() on your nested JSON with the schema
    • Use the returned entities and result fields in your app or store
  3. 3

    Get the most out of it

    • Read the README's schema documentation to model nested relationships correctly
    • Pair with Redux or another state store that accepts flat ID-keyed data
    • Consider forking if you need changes, since the README points there for new features

Downloads

Strengths

  • Widely used, with about 20,778 GitHub stars and npm downloads shown in the README badges
  • The README describes the library as stable at its current release
  • Small, focused scope: it does one job, transforming nested JSON

Trade-offs

  • No longer maintained, so bugs and compatibility issues may not be fixed upstream
  • Last push was March 2022 and the repository is archived
  • Maintainer help was requested but none was found according to the README

How it compares

ProjectStarsTypeLevelUpdatedBest for
normalizr (this)20.8kLibraryintermediate4.6 years agoJavaScript developers who receive deeply nested API responses and want flat, ID-keyed data
fastapi105kLibrarybeginner4 days agoPython developers building JSON APIs or back-end services
zustand58.9kLibrarybeginner15 days agoReact developers who want simpler shared state than Redux
json-server75.7kDev toolbeginner8 months agoFront-end developers who need a backend stub while the real API is not ready
reactjs-interview-questions44.9kCurated listbeginner23 days agoDevelopers preparing for a React job interview
reactotron15.6kDev toolintermediate3 months agoReact Native developers who want to see app state and network calls while debugging

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.