Data generation platform that produces realistic synthetic events and streams them live or generates them in bulk to logs, databases, and HTTP endpoints.
datafaker-net/datafaker
A Java/Kotlin/Groovy library for generating realistic fake data such as names, addresses, and company details for tests and demos.
- Stars
- 1,805
- Forks
- 246
- Open issues
- 15
- Last commit
- 3 days ago
What is it?
Datafaker is a fake data generation library for the JVM, forked from java-faker and updated to current dependencies. It provides a large set of providers covering names, addresses, phone numbers, finance, dates, and many themed categories drawn from popular books, films, and games.
The library supports locale-specific output through language and country codes, so generated names, addresses, and identifiers can match a chosen region. Beyond single values, it offers expression templates, collection and stream generators, unique-value helpers, and schema-based output to CSV, JSON, YAML, and XML. Custom providers can be added to an application.
Datafaker 2.x requires Java 17 or later. Native image support is marked experimental, and a separate CLI generator project is available.
Key features
- 01Provides many data providers for names, addresses, phone numbers, finance, dates, and themed pop-culture data.
- 02Supports locale-specific data through language and country codes.
- 03Offers expression templates such as regexify and numerify for custom patterns.
- 04Generates collections, streams, and unique values.
- 05Exports generated data as CSV, JSON, YAML, or XML through schemas.
- 06Lets applications register custom providers.
Use cases
- Populating test fixtures and mock data in Java or Kotlin unit and integration tests.
- Creating realistic sample data for product demos and showcases.
- Generating localized test records for applications that serve multiple regions.
- Producing seed data files in CSV, JSON, or YAML for development databases.
Quick start
- 1
Add the Maven dependency to pom.xml
- 2
Or add the Gradle dependency to build.gradle
- 3
Try it instantly in JShell with JBang
jbang -i net.datafaker:datafaker:2.7.0
Things to know
- Datafaker 2.x requires Java 17 or newer.
Topics
FAQ
- What is datafaker?
- A Java/Kotlin/Groovy library for generating realistic fake data such as names, addresses, and company details for tests and demos. Datafaker is a fake data generation library for the JVM, forked from java-faker and updated to current dependencies. It provides a large set of providers covering names, addresses, phone numbers, finance, dates, and many themed categories drawn from popular books, films, and games.
- Is datafaker free to use? What license does it have?
- datafaker is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is datafaker still maintained?
- Actively maintained. The last commit to datafaker was on Oct 19, 2026.
- What can I use datafaker for?
- Populating test fixtures and mock data in Java or Kotlin unit and integration tests. Creating realistic sample data for product demos and showcases. Generating localized test records for applications that serve multiple regions. Producing seed data files in CSV, JSON, or YAML for development databases.
- How do I install datafaker?
- Add the Maven dependency to pom.xml Or add the Gradle dependency to build.gradle Try it instantly in JShell with JBang: jbang -i net.datafaker:datafaker:2.7.0
- Where can I get datafaker?
- The source code and installation instructions are on GitHub: https://github.com/datafaker-net/datafaker
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A desktop GUI for Android app testing with ADB, supporting Windows and macOS, with device listing, shell commands, text input, screenshots and virtual displays.
Playwright is a framework for web testing and automation that drives Chromium, Firefox, and WebKit through one API.
A JavaScript library with a high-level API for controlling Chrome or Firefox over DevTools Protocol or WebDriver BiDi, headless by default.
Lightweight React DOM testing utilities that query and interact with components the way users do.
Hurl is a command line tool that runs and tests HTTP requests written in a plain text file format.