JSON
Mock JSON Generator
Tạo dữ liệu JSON giả dựa trên mẫu: giá trị placeholder như {{name}} hoặc {{email}}, và mảng được lặp lại qua "khóa|N".
Placeholder: {{uuid}} {{name}} {{firstName}} {{lastName}} {{email}} {{phone}} {{number(1,100)}} {{float(0,1)}} {{boolean}} {{date(2020,2024)}} {{datetime}} {{word}} {{sentence}} {{paragraph}} {{city}} {{country}} {{company}} {{color}} {{index}} · mảng: "khóa|N": [mẫu] — lặp lại N lần.
Instead of writing test data by hand, this tool generates realistic fake JSON from a template with placeholders like {{name}}, {{email}}, or {{uuid}}. An array with a given number of items is built with the "key|N" syntax.
How to use it
- Describe the shape you want, dropping placeholders in where real values would go.
- For an array of several identically-shaped items, use "key|N", where N is how many you need.
- Each generation produces fresh random values — run it again to get a different data set from the same template.
Common uses
- Filling a local database or UI mockup with realistic test data without hand-writing fixtures.
- Creating a sample API response for documentation or frontend work before the backend is ready.
- Quickly checking how a component or table looks with a large number of data rows.
Things to keep in mind
Each generation is random by design — save the generated JSON separately if you need to see the exact same result again, rather than relying on regenerating it.
The generated data is realistic in form (an email looks like an email) but has no connection whatsoever to real people or records.
Bài viết về công cụ này: Mock JSON Generator: dữ liệu giả dùng để làm gì
Câu hỏi thường gặp
Công cụ này quyết định tạo giá trị giả nào như thế nào?
Nó tạo giá trị dựa trên loại trường và mẫu bạn định nghĩa trong schema hoặc template, như tên, email, số trong một khoảng, hoặc ngày tháng, không dựa vào bất kỳ dữ liệu thật nào.
Tôi có thể nhận cùng dữ liệu giả mỗi lần tạo không?
Nếu công cụ có tùy chọn seed, dùng cùng giá trị seed sẽ tạo ra đầu ra giống hệt mỗi lần chạy; nếu không, giá trị sẽ được ngẫu nhiên hóa lại mỗi lần.
Dữ liệu này có được gửi tới máy chủ không?
Không. Toàn bộ dữ liệu giả được tạo cục bộ trong trình duyệt của bạn bằng JavaScript — không có gì được tải lên bất cứ đâu.
Dữ liệu mock có bao gồm các giá trị biên "khó chịu" không?
Trình tạo cố ý xen kẽ giá trị thông thường với giá trị biên — chuỗi dài, trường rỗng, số ở ranh giới phạm vi. Chính những giá trị này thường phát hiện ra lỗi giao diện hoặc logic mà các ví dụ "dễ chịu" như "test123" không thể phát hiện.
Có thể tạo lại chính xác cùng một bộ dữ liệu mock không?
Mỗi lần tạo đều ngẫu nhiên có chủ đích — để thấy các biến thể dữ liệu mới. Nếu cần đúng kết quả đó lần nữa, hãy lưu JSON đã tạo ra riêng thay vì tạo lại.