A price list usually lives in a spreadsheet: one row per product, one column for the name, one for the price, maybe one for a note. A website, though, rarely reads a spreadsheet directly. The data your site loads, whether it is fetched as a file or pasted into a page template, is very often JSON: a structured list of objects with named fields.

Converting between the two sounds trivial, and mostly it is, but the details decide whether the result is clean. Field names come from your header row. Prices come through as text, exactly as typed. This guide walks through the conversion with the free CSV to JSON Converter on Ovatly, and explains the two or three behaviours worth knowing before you rely on the output.

Contents

  • Quick answer
  • What the conversion actually produces
  • Header names become field names
  • Prices stay strings, exactly as written
  • How to convert a price list, step by step
  • Worked example: the mechanics on a tiny file
  • Limitations and honest tradeoffs
  • Common mistakes
  • FAQs
  • Conclusion
  • References

Quick answer

Save or copy your price list as CSV with one clean header row, then open the CSV to JSON Converter, paste the text or open the file, and leave the header option on. Each row becomes a JSON object whose keys are your header names, and every value, including each price, stays a string exactly as written. Download the result as converted.json and hand it to your website. The whole conversion runs in your browser; nothing is uploaded.

What the conversion actually produces

With the header option on, the output is an array of objects: one object per data row, keyed by the header names. Turn the header option off and the output is an array of arrays instead, one inner list per row, which suits data with no meaningful column names. A price list has meaningful names, so the header option is the right choice here.

Here is the shape of it on a small file:

name,age
Ana,31
Ben,28
[
  { "name": "Ana", "age": "31" },
  { "name": "Ben", "age": "28" }
]

Notice the ages: 31 and 28 are in quotes. That is deliberate, and the next sections explain why it matters for prices too.

Header names become field names

Your header row is not decoration. It becomes the vocabulary your website code reads. If the header says price, the JSON object has a price field, and the code that renders your price list will look for exactly that name.

Two habits keep this painless. First, keep header names short and stable: item, price, note are easier to work with than a long label typed for human eyes, and renaming a header later means renaming it in the site code too. Second, keep each name unique. Two columns with the same header are two claims on the same key, and one of them will win in a way you did not plan.

Prices stay strings, exactly as written

The converter never guesses at types. It does not decide that 12.50 is a number, that a date looks like a date, or that a code with leading zeros should lose them. Every value comes out as a string, character for character as it appeared in the CSV.

For a price list this is mostly good news. A price written as 12.50 displays as 12.50, not 12.5. A price written with a currency symbol in the cell, such as £12.50, keeps the symbol in the text. Nothing is rounded, trimmed or silently reformatted between your spreadsheet and your website.

The flip side is discipline: because nothing is normalized for you, consistency is your job. If one row says 12.50, the next says 12.5 and a third says £12.50, the JSON will faithfully carry all three styles to your page. Pick one format for the price column and hold it down the whole list before you convert.

How to convert a price list, step by step

  1. Tidy the spreadsheet first: one header row with short, unique names, one format for prices all the way down, and no totals row at the bottom (every row after the header becomes a record, so a totals row would become a product).
  2. Export or save the sheet as CSV, or copy the rows as text.
  3. Open the CSV to JSON Converter and paste the CSV text, or open the file from your device.
  4. Leave the header option on so each row becomes an object keyed by your header names.
  5. Check the output: one object per product, prices in quotes and exactly as written.
  6. Download converted.json and add it to your website wherever your code expects the price data.

Worked example: the mechanics on a tiny file

Take a two-row price list:

item,price
Notebook,4.25
Desk lamp,18.00

Converted with the header option on, it becomes:

[
  { "item": "Notebook", "price": "4.25" },
  { "item": "Desk lamp", "price": "18.00" }
]

The lamp keeps its trailing zeros, because 18.00 was the text in the cell. If your site adds up prices, the code converts the text to a number at that point; the JSON itself stays an honest copy of the list you wrote.

Limitations and honest tradeoffs

The converter converts; it does not validate your prices, check your arithmetic, or know what your website expects. If a price cell contains a note instead of a number, it will be carried into the JSON as text without complaint.

Rows shorter than the header are padded with empty strings, so a product missing its price becomes an object with a blank price field rather than an error. That keeps the conversion forgiving, but it also means a gap in the sheet can slip through quietly if you do not scan the output.

Finally, every value being a string is a real tradeoff. It protects leading zeros and exact formatting, but any maths, sorting by value or range check has to happen in your site code after reading the text.

Common mistakes

  • Leaving a totals or summary row in the CSV. Every row after the header becomes a record, so the totals row becomes a fake product in your JSON.
  • Using long, sentence-like header names. They become field names your code must repeat exactly. Short and stable beats descriptive here.
  • Mixing price formats down the column. The converter will not normalize 12.5, 12.50 and £12.50 into one style. Fix the column first.
  • Renaming a header after the site is built. The field name in the JSON and the name in the code must match, or the price silently disappears from the page.
  • Trusting padded blanks. A short row gains empty strings instead of failing. Read the output once before shipping it.

FAQs

Will my prices be turned into numbers in the JSON? No. Every value stays a string, exactly as written in the CSV. A price of 12.50 comes out as the text 12.50, and a currency symbol typed into a cell stays in the text too. Your website code decides how to display or calculate with it.

What do the header names become? With the header option on, each header name becomes a key in a JSON object, one object per row. Short, stable names like item and price are easier for your site code to read than long labels with spaces.

Do I have to upload my price list to a server? No. You paste the CSV text or open the file in the page, and the conversion happens locally in your browser. Nothing is uploaded, so a price list that is not public yet stays private.

What happens if one row is shorter than the others? Rows shorter than the header are padded with empty strings, so the short row still produces a complete object with blank fields. It is better to fix the gap in the spreadsheet first so the blank is a choice, not a surprise.

Can I convert a price list that uses semicolons or tabs instead of commas? Yes. The delimiter is detected automatically, so comma, semicolon and tab separated files are all read. Quoted fields are handled by the standard CSV rules, so a product name containing a comma survives intact when it is quoted in the CSV.

Conclusion

A price list converts cleanly when the header row is treated as field names and the price column is kept in one consistent format. The CSV to JSON Converter does the mechanical part in your browser, preserving every value exactly as written, and the guide to preparing CSV data before converting covers the pre-flight checks in full. For more guides in this series, see our Data and JSON Tools guides.

References