JSON to CSV Preserving Types
CSV is fundamentally a string format.
Native JSON tool
JSON to CSV
Numbers stay numeric
Booleans as bare true/false
Nulls as empty cells
Configurable type formatting
- Cost
- Free tier
- Sign-up
- Not required
- Processing
- Tool-specific
- Privacy
- Clearly disclosed
Add this JSON to CSV to your website
Drop the JSON to CSV into a blog post, product docs, intranet, or school portal with one iframe. Processing, privacy, and usage limits are the same as on the full tool page.
- One copy-ready line of HTML
- Responsive — adapts to any container width
- No API credentials are placed in the snippet
Embed code
<iframe
src="https://www.fixtools.io/json/json-to-csv?embed=1"
width="100%"
height="780"
frameborder="0"
style="border:0;border-radius:16px;max-width:900px;"
title="JSON to CSV by FixTools"
loading="lazy"
allow="clipboard-write"
></iframe>Attribution-friendly: a small "Powered by FixTools" link appears in the embed footer.
How types travel from JSON through CSV
JSON has six value types: string, number, boolean, null, object, and array. CSV has one: string. Bridging the gap means representing each JSON type as a string that a downstream tool can parse back into the right type on import. Numbers travel by writing them unquoted: 42, not "42". Spreadsheet and data tools coerce unquoted numeric strings to numbers automatically. Booleans travel by writing the literal tokens true and false. Most tools recognise these on import, though Excel reads them as text by default unless the column is explicitly typed. Nulls travel as empty cells, which is the convention every spreadsheet and SQL bulk-import tool recognises.
Strings travel quoted when necessary per RFC 4180. A string value that happens to look like a number, such as a ZIP code with leading zeros, needs special handling because most tools coerce it to a number on import and strip the leading zeros. FixTools offers a column-level option to wrap such strings in =" syntax, which signals text to Excel and prevents coercion. This is the difference between 00501 staying as 00501 in the CSV and becoming 501 after Excel opens the file.
Numbers with very high precision are another edge case. JSON numbers are conventionally double-precision floats per the spec, with about 15 significant digits of safe precision. Values beyond that can lose precision during parse. If your data has integers larger than 2^53 (such as Twitter snowflake IDs or some Mongo numberLong values), keep them as strings in the source JSON to preserve precision through the conversion.
Dates are not a JSON type but appear as ISO 8601 strings by convention. They travel through CSV cleanly because the string representation is preserved exactly. Excel auto-parses ISO 8601 dates as date values on import for most regional locales. For dates in non-standard formats, the downstream tool may parse them as text rather than dates, in which case you can format them as proper dates in the spreadsheet after import.
How to use this tool
Preserve numeric, boolean, and null types when converting JSON to CSV so downstream tools recover them as native types.
How It Works
Step-by-step guide to json to csv preserving types:
- 1
Paste JSON
Paste the JSON or upload the file. The parser detects the value types per column based on the records present.
- 2
Choose null handling
Pick how to represent nulls: empty cells (default, recommended for most tools), the literal string null, or a custom placeholder.
- 3
Choose boolean handling
Pick whether to write booleans as bare true and false, as 1 and 0, or as Yes and No. Default is true/false.
- 4
Preserve string-numbers if needed
For string values that look like numbers but should not be coerced (ZIP codes, account numbers, SKUs), enable the text-coercion option for those columns to wrap them in =" syntax.
- 5
Download
Download and open in your spreadsheet. Numbers, booleans, and dates load as their native types. String columns flagged as text preserve leading zeros and other identifier formatting.
Real-world examples
Common situations where this approach makes a real difference:
ZIP code preservation
An analyst converts a JSON address list where ZIP codes start with 0. Without text marking, Excel strips the leading zeros. With text marking enabled on the ZIP column, 00501 stays as 00501.
Snowflake ID precision
A developer converts Twitter API data containing snowflake IDs larger than 2^53. Keeping the IDs as strings in the source JSON and marking the column as text in the converter preserves full precision through the CSV.
Boolean for survey responses
A researcher converts survey response JSON with boolean answers. The converter writes Yes and No instead of true and false, which is more readable for the analyst who opens the CSV in Sheets.
Null as empty for SQL import
A data engineer prepares a CSV for COPY into PostgreSQL. Empty cells become NULL automatically in COPY. The converter's default empty-cell null handling matches PostgreSQL's expectation without per-column configuration.
Pro tips
Get better results with these expert suggestions:
Test type inference on first open
After downloading, open the CSV and click into a few numeric cells to confirm they read as numbers (right-aligned in Excel by default) and a few boolean cells to confirm the format. Spotting a coercion issue early saves redoing the analysis.
Use ISO 8601 for dates
If your source JSON has dates, ensure they are ISO 8601 strings before conversion. ISO 8601 is unambiguous and parses correctly in every modern tool. Other formats like "1/2/2024" are ambiguous (January 2 in US, February 1 in Europe) and produce inconsistent results across recipients.
Quote large integers as strings
For integers beyond 2^53, keep them as strings in the source JSON to preserve precision. The CSV then carries them as text, and your downstream tool treats them as identifiers rather than numbers.
Document null convention with recipient
If the CSV goes to a recipient with a strong null convention (database load script expecting empty cells, analyst expecting the literal "null"), confirm before sending. A one-line note saves a confused round-trip.
Frequently asked questions
Related guides
More use-case guides for the same tool:
Related tools
Other tools you might find useful:
Ready to get started?
Open JSON to CSV to review its free limits and processing method.
Open JSON to CSV →Free tier · No account needed · Transparent limits