Random CSV Generator

Same dual-pane column picker as the JSON generator: set rows in the head, toggle fields, Generate UTF-8 CSV with header—edit in the output pane, copy, or download with BOM for Excel.

Tabular mock data as CSV text

Spreadsheets, ETL jobs, and BI tools usually ingest comma-separated tables: one header line naming columns, then one record per line. Synthetic CSV lets you stress column width, delimiter parsing, and import pipelines without exporting real customer rows.

Same column picker as the Random JSON generator—switch output to CSV here, reshape existing data with JSON to CSV, open in Excel via CSV to Excel, or chart columns with CSV chart.

CSV structure and spreadsheet semantics

Header row and record lines in CSV

  1. Row 1 is typically field names—downstream mappers bind header text to schema keys.
  2. Each following row is one observation; column count should match the header unless a parser allows ragged rows.
  3. Line breaks inside a cell require wrapping the cell in double quotes per RFC 4180-style rules.
  4. Empty lines at file end are often ignored but can break strict row-count assertions in tests.

UTF-8, BOM, and Excel on Windows

  1. UTF-8 encodes international text in one byte stream—preferred for modern ETL and web uploads.
  2. A UTF-8 BOM (byte order mark) at file start helps Excel recognize encoding when double-clicking .csv on Windows.
  3. Excel may still infer types—leading zeros on id-like columns can disappear unless the column is text-formatted.
  4. Saving as .xlsx via CSV to Excel preserves Sheet1 layout without retyping delimiters.

Why CSV drops JSON types

  1. CSV stores characters only—booleans and numbers re-import as strings unless a schema step casts them.
  2. Quoted "true" in CSV is indistinguishable from a string literal without a type map.
  3. Null is usually an empty field—distinct from the word null unless your pipeline treats it specially.
  4. Mock generators should still use realistic patterns (emails, dates) even when types flatten on import.

Mock CSV in ETL and QA workflows

  1. Pipeline smoke tests: feed 10–500 rows through ingest, assert row counts and header names before joins.
  2. Spreadsheet QA: wide columns (company, url) reveal wrap and filter bugs faster than numeric-only grids.
  3. Chart sanity checks: paste into CSV chart to confirm category vs measure columns before dashboards.
  4. Regenerated rows change values—assert headers and parse success, not fixed cell literals, unless seeded.

When random CSV helps

Import and ETL demos

Hand partners a headered sample file before production extracts exist.

Excel and database loaders

Download UTF-8 CSV, convert to xlsx, or load into staging tables for constraint tests.

Frequently asked questions

How do I generate random CSV for testing?
Pick columns, set row count, and click Generate. You get a header row plus UTF-8 data lines to copy or download.
How to create fake CSV data with headers?
Enable columns like id, name, email, and city—the first line lists those keys, following lines are mock values.
Random CSV generator vs JSON generator?
This page outputs CSV text. The Random JSON generator emits a typed JSON array with the same column toggles.
How to open generated CSV in Excel?
Download the file or paste into a sheet; for a workbook file use CSV to Excel after generating.
Does CSV include UTF-8 BOM for Excel?
Downloads use UTF-8 with BOM so Windows Excel is more likely to read accents and CJK headers correctly.
What if my fields contain commas?
RFC-style exporters quote fields that contain commas, quotes, or newlines—mock strings are chosen to stay simple unless you add custom keys.
How many rows can I generate?
Up to 500 rows per run—enough for scroll and import tests while keeping files easy to email or paste.
Can I turn existing JSON into CSV instead?
Yes—paste a JSON array into JSON to CSV when you already have data rather than generating new mocks.