JSON Server: Fake REST API from JSON files
Zero-config REST API server from JSON files.
Learn more about JSON Server
JSON Server is a Node.js command-line tool that creates a functional REST API by reading data from a JSON or JSON5 file. It automatically generates standard HTTP endpoints (GET, POST, PUT, PATCH, DELETE) for each top-level property in the data file, handling routing and basic data operations internally. The tool supports query parameters for filtering, sorting, pagination, and nested field access, along with static file serving from a public directory. It is commonly used during frontend development, API prototyping, and testing scenarios where a real backend is not yet available.
Zero configuration setup
Requires only a JSON file to generate a complete REST API. No server code, configuration files, or build steps are needed beyond running the CLI command.
Query parameter filtering
Supports conditional operators (gt, gte, lt, lte, ne), range queries, pagination, sorting, and nested field access through query strings without custom endpoint logic.
JSON5 format support
Accepts both standard JSON and JSON5 files, allowing unquoted keys, trailing commas, and comments in data files for easier manual editing during development.
import axios from 'axios';
// Get all posts from json-server endpoint
const response = await axios.get('http://localhost:3000/posts');
const posts = response.data;
console.log(posts);feat: add JSON Schema
- –feat: add JSON Schema
This release improves performance, drops Node.js 20 support, and migrates to TypeScript with pnpm.
- –perf: replace Object.entries/fromEntries with Object.keys for better performance
- –fix: handle undefined case in filtering logic
- –chore: use oxlint
- –Drop Node.js 20 support and enforce erasable TypeScript syntax
- –use TS natively and switch to pnpm
fix: allow any request header in CORS
- –fix: allow any request header in CORS
- –chore: update all dependencies
Top in Developer Tools
Related Repositories
Discover similar tools and frameworks used by developers
Keiyoushi Extensions
Extension management for the Keiyoushi multi-source content aggregation platform.
GraphiQL
Browser-based GraphQL IDE with language service tooling.
Fastfetch
High-performance CLI system information display written in C.
Chrome DevTools MCP
MCP server that provides AI coding assistants with Chrome DevTools access for browser automation and debugging.
wifi-password
Bash utility for extracting Wi-Fi passwords from macOS keychain storage.
Related Reading
Guides and comparisons from the Greptile content library
How to ACTUALLY Think About Code Reviews: The 3-Layer Checklist
A code review checklist and best practices organized around three layers — Mechanical, Structural, and Narrative — that help any team improve code quality without slowing reviews down.
What is Shift Left Testing? Everything Engineering Leaders Need to Know
The five types of shift-left testing, the benefits and limitations of each, and how the approach changes when agents write and review a growing share of your code.
Best AI Coding Tools for Solo Developers (2026 Review)
The best AI coding tools for solo developers in 2026, compared by where they fit in the software development lifecycle: writing code, prototyping, reviewing, testing, and background automation. Plus which tools fit which languages.
How Greptile Uses Infisical for Secrets Management
How Greptile uses Infisical to keep every secret in one store and let its AI review agents call customer services without ever holding the credentials.