Playground
Generate fake data right in your browser! This playground uses the same WebAssembly-compiled engine that powers the Rust library.
How to Use
- Configuration - Enter your datafake configuration in the editor
- Count - Set the number of records to generate (1-100)
- Generate - Press the Generate button or use Ctrl+Enter (Cmd+Enter on Mac)
- Load Examples - Use the dropdown to load pre-built example configurations
Configuration Structure
| Field | Description |
|---|---|
metadata | Optional name/version info |
variables | Pre-generate values to reuse |
schema | Define the output structure |
The fake Operator
The fake operator is the core of datafake-rs. Use it to generate various types of fake data:
{"fake": ["type"]}
{"fake": ["type", arg1, arg2]}
Common Examples
| Type | Syntax | Description |
|---|---|---|
| UUID | {"fake": ["uuid"]} | UUID v4 identifier |
| Name | {"fake": ["name"]} | Full name |
{"fake": ["email"]} | Email address | |
| Integer | {"fake": ["u8", 18, 65]} | Integer with range |
| Float | {"fake": ["f64", 0.0, 100.0]} | Float with range |
| Choice | {"fake": ["enum", "A", "B", "C"]} | Random selection |
Quick Reference
Personal Data
name,first_name,last_name,titleemail,phone_number,username
Address
street_address,city,state_name,country_namezip_code,latitude,longitude
Internet
ipv4,ipv6,mac_address,domain_nameuser_agent,password
Finance
bic,bic8,bic11,ibancredit_card_number,currency_code
Content
word,words,sentence,paragraphuuid,bool
See Fake Data Types for the complete list.