Skip to content

Getting Started

Overview

Faker is a popular library that generates fake (but reasonable) data that can be used for things such as:

  • Unit Testing
  • Performance Testing
  • Building Demos
  • Working without a completed backend

Faker was originally written in Perl and this is the JavaScript port. Faker is also available as a library for Ruby, Java, and Python.

This documentation only covers the JavaScript implementation of Faker.

Environments

You can run Faker in the browser, or in Node.js. Faker v8.0 requires Node.js version 14 or above. Both ESM and CommonJS imports are available.

Installation

Install it as a Dev Dependency using your favorite package manager.

shell
npm install @faker-js/faker --save-dev
shell
pnpm add @faker-js/faker --save-dev
shell
yarn add @faker-js/faker --dev

Community

If you have questions or need help, reach out to the community via Discord and GitHub Discussions.

You can see awesome things related to the Faker community at Awesome Faker.

Released under the MIT License.