Faker produces large volumes of realistic fake data for tests and development in Node.js and the browser. It offers localized person, place, commerce, and finance modules.
Overview
Faker is a JavaScript library for generating fake but plausible data during testing and application development. It covers people, locations, dates, finance, commerce, numbers, strings, and specialty generators such as hacker-style phrases.
Modules expose names, addresses, job titles, prices, product text, account details, transactions, crypto-style addresses, and more. The project stresses realistic-looking output rather than obviously synthetic placeholders, so generated contact data might coincidentally match real records and should not be used to message real people.
Consumers can import a tree of APIs or use standalone functions geared toward smaller bundles. A helper combines methods with mustache-style templates. Dozens of locales localise names, addresses, and phone numbers, with English as the default and fallbacks when a locale lacks a module.
Seeding the random generator yields reproducible datasets for tests. Documentation and API references are published per release line, and an online try-it experience is available.
Key features
- Person, location, and date generators
- Finance and commerce fake records
- Over 70 localization locales
- Standalone and tree import styles
- Mustache-style helper templates
- Reproducible output via seeding
- Browser and Node.js usage
Use cases
- Populating test databases
- UI prototypes with plausible content
- Load tests needing varied records
- Localized demo datasets