Faker

Generate massive amounts of realistic fake data for testing, seeding, and mocking in JavaScript and TypeScript.

Library
npm
v10.6.0
15,483stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
91/100Excellent
Development Activity100
Maintenance100
Community68
Maturity56
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
84/100Excellent
Architecture88
Code Quality92
Innovation65
Learning Curve90

Faker is a zero-dependency JavaScript and TypeScript library for generating large volumes of realistic-looking fake data. It exposes dozens of topic-scoped modules — person, location, commerce, finance, internet, date, and more — so instead of hand-writing placeholder values, developers call typed methods like faker.person.firstName() or faker.internet.email() to produce data that looks real without being real.

The library is organized around per-topic modules (currently 24+ covering airline, animal, book, color, commerce, company, database, date, finance, food, git, hacker, image, internet, location, lorem, medical, music, person, phone, science, system, vehicle, and word data) and supports over 70 locales, so generated names, addresses, and phone numbers can be localized instead of defaulting to generic English placeholders.

Faker is commonly used to seed development databases, generate mock API responses, and populate test fixtures, and its deterministic seeding (faker.seed()) lets teams reproduce the exact same ‘random’ dataset across test runs. The project was revived by the community after the original faker.js was deliberately corrupted by its maintainer in January 2022, and is now maintained under the faker-js organization with an active release cadence and a large contributor base.

What You Get

  • 24+ topic modules (person, location, commerce, finance, internet, date, git, hacker, image, music, phone, science, vehicle, word, and more) covering the vast majority of fake-data needs out of the box
  • 70+ locale data sets, with instance-level locale selection and configurable fallback so localized names, addresses, and phone numbers don’t default to English
  • Deterministic seeding via faker.seed() for reproducible datasets across test runs and CI environments
  • A zero-runtime-dependency, fully typed (TypeScript-first) API with tree-shakeable ESM exports for smaller bundle sizes when only specific modules or locales are imported
  • A template helper (faker.helpers.fake) for combining multiple generator calls into a single mustache-style string
  • A SimpleFaker base class and a full Faker class, letting consumers build custom locale-scoped instances rather than only using the default shared instance

Common Use Cases

  • Seeding local or staging databases with realistic-looking sample data during development
  • Generating mock API response payloads for frontend development before a backend endpoint exists
  • Populating fixtures and factories in unit/integration test suites (e.g. with vitest, jest, or factory libraries)
  • Producing consistent, seeded synthetic datasets for demos, load testing, or documentation examples
  • Building localized test data (names, addresses, phone formats) for internationalized applications

Under The Hood

Architecture Faker’s core class hierarchy runs SimpleFaker (src/simple-faker.ts) as the base random/seed engine, extended by the full Faker class (src/faker.ts) which composes 24+ per-topic modules (AirlineModule, PersonModule, InternetModule, etc., under src/modules/) as readonly instance properties. Each module is a self-contained class exported from its own index.ts/module.ts, so adding or modifying a data domain doesn’t touch the core engine. Locale data lives separately under src/locales/ (78 locale directories) and src/locale/, decoupled from module logic via a LocaleProxy internal layer, so the same module code can serve any locale’s dataset. This module-per-topic, locale-as-data separation means the core abstraction that would break the most if changed is the Faker/SimpleFaker constructor contract, since every module depends on it for seeded randomness.

Tech Stack The project is 100% TypeScript, built with tsdown for the distributable ESM output and tsc for type-checking, inside a pnpm workspace (pnpm-workspace.yaml). It ships as type: module with zero runtime dependencies in package.json — only devDependencies (27 entries) for tooling. Linting and formatting use oxlint/oxfmt (Rust-based, faster alternatives to ESLint/Prettier) rather than the more common JS toolchain. Documentation is built with VitePress (docs/ directory), and release automation runs through commit-and-tag-version.

Code Quality The test/ directory mirrors src/modules/ one-to-one, using Vitest with a shared seededTests helper (test/support/seeded-runs.ts) that runs each generator method with a fixed seed and asserts against stored snapshots (test/snapshots/), catching any unintended change in output distribution. Coverage is collected via the v8 provider across clover/cobertura/lcov/text reporters. GitHub Actions (.github/workflows/ci.yml, integration-test.yml, pr.yml) run lint, type-check, unit tests, and a separate integration-test pass. The combination of per-module seeded snapshot tests plus full TypeScript typing gives strong confidence that a change to one module’s output is caught immediately.

API Design The public API favors flat, discoverable namespacing (faker.person.firstName(), faker.internet.email()) over deeply nested configuration objects, so autocomplete alone documents most of the surface area. Locale switching is done by importing a differently-named export (fakerDE, fakerJA) or constructing a custom new Faker({ locale: [...] }) instance rather than passing a locale string at call time, which trades a small amount of runtime flexibility for compile-time tree-shaking of unused locale data. A single template helper (faker.helpers.fake) covers the common case of composing multiple fields into one string, avoiding the need for consumers to hand-write string interpolation across several module calls.

Used by 59 apps in this directory

TypeScript
99%
Other

Activepieces

Automation · AI Assistants

24,298

Open-source AI automation platform that converts 280+ workflow integrations into MCP servers for LLMs, with no-code builders and TypeScript extensibility.

View details
92
Repo Health
85
Technical
64
Dependency
Built with
TypeScript99%
Updated today
TypeScript
87%
Other

AFFiNE

Productivity · Project Management · Note Taking

72,238

Write, draw, and plan in one infinite canvas — the open-source alternative to Notion and Miro that keeps your data yours.

View details
91
Repo Health
87
Technical
67
Dependency
Built with
TypeScript87%
Updated yesterday
TypeScript
72%
AGPL 3.0

APITable

Low Code Platforms · Databases

15,588

API-first collaborative spreadsheet-database platform that auto-generates REST APIs and lets teams build internal tools, CRMs, and dashboards without code.

View details
74
Repo Health
77
Technical
60
Dependency
Built with
TypeScript72%
Java22%
Updated yesterday
TypeScript
68%
Apache 2.0

Appsmith

Developer Tools · Automation · No Code Platforms

40,825

Open-source low-code platform to build admin panels, dashboards, and internal tools connected to any database or API.

View details
93
Repo Health
79
Technical
66
Dependency
Built with
TypeScript68%
Java21%
Updated 3 days ago
TypeScript
49%
MPL 2.0

Artillery

Devops · Developer Tools

9,071

Cloud-scale load testing and functional testing for APIs, WebSockets, gRPC, and headless browsers, distributed across AWS Lambda or Fargate with zero infrastructure to manage.

View details
88
Repo Health
73
Technical
68
Dependency
Built with
TypeScript49%
JavaScript48%
Updated 1 weeks ago
Python
67%
Other

AutoGPT

Automation · Productivity · AI Assistants

187,177

Build, deploy, and run autonomous AI agents that automate complex multi-step workflows using a visual block-based graph editor.

View details
93
Repo Health
78
Technical
66
Dependency
Built with
Python67%
TypeScript32%
Updated today
JavaScript
100%
Other

Automatisch

Automation · No Code Platforms

13,964

Self-hosted, no-code workflow automation that keeps your data on your own servers—a privacy-first alternative to Zapier with 90+ integrations.

View details
49
Repo Health
78
Technical
63
Dependency
Built with
JavaScript100%
Updated 6 months ago
Python
68%
Other

Baserow

No Code Platforms · Databases

5,830

Open-source no-code platform to build databases, apps, automations, and AI agents — self-hosted or cloud, with full data ownership.

View details
89
Repo Health
84
Technical
68
Dependency
Built with
Python68%
JavaScript16%
Vue12%
Updated yesterday
TypeScript
97%
AGPL 3.0

Bigcapital

Invoicing Finance

3,884

Self-hostable double-entry accounting platform with invoicing, inventory, multi-currency, and real-time financial reporting for small and medium businesses.

View details
91
Repo Health
77
Technical
61
Dependency
Built with
TypeScript97%
Updated yesterday

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search