You convert a CSV file to JSON, open the result, and something looks off. The ages are wearing quotes: "31" instead of 31. The dates came through in whatever format the spreadsheet used, untouched. Your first thought is that the conversion half failed. It did not: you are looking at the single most important rule of CSV to JSON conversion, working as it should.
This guide explains the rule and what it means for the two value types people care about most, numbers and dates, using the free CSV to JSON Converter on Ovatly.
Contents
- Quick answer
- The one rule behind every surprise
- Numbers: quotes are protection, not a bug
- Dates: the format you wrote is the format you keep
- The ambiguous date problem
- Why the converter refuses to guess
- Where real numbers and dates are made
- How to convert with types in mind, step by step
- Worked example: Ana's age arrives as "31"
- Limitations and honest tradeoffs
- Common mistakes
- FAQs
- Conclusion
- References
Quick answer
When you convert CSV to JSON with the CSV to JSON Converter, every value stays a string. Numbers arrive as text, so 31 becomes "31". Dates keep the format your CSV carries, with no reformatting and no timezone conversion. Ambiguous dates must be fixed in the CSV first, and typing is the receiving side's job. Paste your CSV or upload the file, leave the header on if the first row holds column names, convert, and download converted.json.
The one rule behind every surprise
CSV has no data types: a cell showing 31 is the characters 3 and 1, nothing more. A spreadsheet may treat it as a number while you edit, but the exported file carries text.
A converter facing that text can guess which cells look like numbers or dates, or copy each cell faithfully as a string. This converter copies: no guessing, no reformatting, no silent edits. Accept that rule and every behaviour below follows: the quotes, the untouched dates, the surviving zeros.
Numbers: quotes are protection, not a bug
A number in the CSV arrives as a string: 31 becomes "31", and a price written as 31.50 becomes "31.50", trailing zero preserved, because the text is copied rather than reinterpreted.
This looks like a defect until you meet the values guessing would damage. Product codes, account references and postal codes often start with zeros: 00751 is a different code from 751, and a converter that emits it as a JSON number strips the zero and hands the receiver the wrong code, silently. Long reference numbers fare worse, losing digits to rounding. Strings make those losses impossible, and the number stays usable: it becomes a true number later, on the receiving side, where conversion is deliberate.
Dates: the format you wrote is the format you keep
Dates follow the same rule. A date cell is copied as the exact text the CSV carries: if your file says 2026-03-04, the JSON says "2026-03-04"; if it says 03/04/2026, the JSON says "03/04/2026". No reformatting, no timezone conversion shifting a date by a day.
Faithful copying is the safe default, but it leaves one responsibility with you: the CSV's format is the receiver's format, so fix mixed layouts at the source.
The ambiguous date problem
One format deserves its own warning: 03/04 could be 3 April or March 4, depending on the writer's convention. As text it is genuinely ambiguous, and no reader, human or software, can resolve it from the characters alone.
The converter does not try: 03/04 arrives as "03/04", ambiguity included. That is honest, but the ambiguity becomes the receiver's problem, and a receiver forced to guess will sometimes guess wrong. The fix belongs before conversion: rewrite ambiguous dates unambiguously, ideally year-first, 2026-03-04, where the meaning cannot be mistaken. Two minutes at the source prevents an error class that is nearly impossible to trace later.
Why the converter refuses to guess
Guessing feels helpful and is not. A typing converter must decide for every cell whether the text is a number, a date, or text that merely looks like one, and it will sometimes decide wrong: a code loses its zero, a date flips month and day, an identifier loses precision. Each wrong guess produces valid-looking JSON with wrong data inside, the most dangerous kind of error, because nothing complains.
Refusing to guess trades a small inconvenience for a guarantee: the JSON says exactly what your CSV said.
Where real numbers and dates are made
Typing happens on the receiving side. The app, API or script reading your JSON knows what each field should be: age a number, signup_date a date, code text that must never be touched. It converts strings deliberately, field by field, and can reject a value that does not fit instead of mangling it.
How to convert with types in mind, step by step
- Before converting, scan your CSV for ambiguous dates and rewrite them in an unambiguous format in the source file.
- Open the CSV to JSON Converter and paste your CSV text or upload the file; the delimiter is detected automatically, tabs included.
- Leave the header checkbox on if the first row holds column names, so each row becomes an object keyed by those names.
- Convert and inspect the output: confirm a number arrives as a string and a leading zero survived whole.
- Download converted.json, and let the receiving side turn strings into numbers and dates with its own rules.
Worked example: Ana's age arrives as "31"
Start with the entry example, a header row and two people:
name,age
Ana,31
Ben,28
With the header on, the conversion produces:
[
{ "name": "Ana", "age": "31" },
{ "name": "Ben", "age": "28" }
]
Everything in this guide is visible in those two records: the ages are quoted strings, copied character for character. Add a date column and the same rule applies: 2026-03-04 arrives as "2026-03-04"; 03/04 arrives as "03/04", still ambiguous, still yours to fix at the source. A code like 00751 would arrive as "00751", zero intact, which is the whole point.
Limitations and honest tradeoffs
The converter will not type anything for you, ever. If your receiving system cannot convert strings itself, that extra step is yours to arrange; this tool does not remove it.
It will not rescue inconsistent source data either: mixed and ambiguous date formats pass through faithfully, so the JSON is only as good as the CSV. Rows shorter than the header are padded with empty strings, so a missing value arrives as an empty string, not a number, a date or a null.
Quoted fields are read by standard CSV rules, so correctly quoted data converts cleanly; a malformed quote in the source is yours to fix, not something the converter can interpret for you.
Common mistakes
- Expecting numeric output and reporting the strings as a bug. Quotes around 31 are the design; typing belongs to the receiver.
- Blaming the converter for a wrong date. If 03/04 lands as the wrong day downstream, the ambiguity was in the CSV; the converter only copied it.
- Fixing types by hand inside a large JSON file. Editing hundreds of quoted values invites new errors; fix dates in the CSV and let the receiver type the numbers.
- Stripping leading zeros to make codes look numeric. A code is text that happens to be digits. Keep it a string end to end.
- Assuming a date was converted because it looks tidy. A neat format in the output means your CSV was neat, not that conversion happened.
FAQs
Why does 31 come out as "31" with quotes around it? Because every value stays a string exactly as written in the CSV; the converter never guesses types. That protects values a guess would damage, like codes with leading zeros, and leaves typing to the receiving side.
Will the converter reformat my dates into a standard format? No. Dates keep the exact format the CSV carries, with no reformatting and no timezone conversion: what you wrote is what arrives.
My dates are written as 03/04. Which date is that in the JSON? Still 03/04, as text. The converter copies the ambiguity faithfully, since it cannot know whether you meant 3 April or March 4. Rewrite it unambiguously in the CSV before converting.
What happens to codes with leading zeros, like 00751? They survive intact, because the value stays a string. A guessing converter would strip the zero and hand the receiver a different code.
So how do the values ever become real numbers or dates? The receiving app or API converts the strings into numbers and dates on its side, deliberately, using its own rules, because it knows what each field should be.
Conclusion
Handle dates and numbers by remembering one rule: conversion copies text faithfully, and typing is a separate, deliberate step belonging to the receiver. Keep dates unambiguous, let the quotes around numbers be, and your JSON will say exactly what your data said. For the full workflow, see the companion guide on converting spreadsheet data to JSON without writing code, and browse the series in our Data and JSON Tools guides.
References
- RFC 8259, the JSON data interchange standard: https://www.rfc-editor.org/rfc/rfc8259
- RFC 4180, the common format and MIME type for CSV files: https://www.rfc-editor.org/rfc/rfc4180