Product feed file formats: from JSON to CSV, what’s the difference and how do they work?

May 7, 2019
Your choice of file format should not greatly affect the performance of your products. However, different channels will have different requirements. While some will accept a number of different feed file formats, others may accept just one type. As a result, your team will probably be using multiple formats on a regular basis. Plus, if you want to switch from manual upload to an API, you may have to use another format. For this reason, it can be helpful to understand the options, their structure, and what makes each unique. Plus it’s great knowledge to help get you more grounded with your product data. If you’re wondering why your team is using CSV here but TXT there, or how your data ended up in an XML file, this may help clear up the confusion.
Here are some of the most common product feed file formats. We’ll also look at where and how they’re used, and what to expect when you open them up. The next time you open up a file, you should have a much better idea of what’s inside!

What kind of files are you using? Is one format better than the others?

There’s no one perfect answer or file format. However, it’s important to consider what kind of resources are available to your team as well as what kind of products the feed will include. For example, while CSV may require less overhead in terms of effort, it may not be practical if there are all kinds of complex attributes and different formats within your feeds. Furthermore, depending on how and where you distribute your feeds, there may be additional requirements.
Most likely, the marketing team won’t have to worry at all about feed file formats, as this will be left up to other departments. However, it may feel very confusing when surrounded by all these unusual file extensions and layouts. To get a better idea of the landscape, check out the table below for some basic information on which formats are accepted for manual upload by popular channels. Then, we’ll get into a description of each of these formats and why one may work better for your team than others.
  • CSV
  • TSV
  • Atom XML
  • TSV
  • XML
  • TXT
Amazon Marketplace API
  • XML
  • CSV
  • XML
  • CSV
  • TSV
  • XML
  • CSV
  • TXT (Tab-delimited)

CSV: Comma-separated value

Comma-separated value files indicate that different pieces of data are separated by comma or another defined character. In fact, it’s better to think of CSV as using character-separated values. That means you may use any type of character (like a colon or tab) to indicate separations. Check it out below.
CSV product feed file example extract

The major downside of using CSV for product data is that you must keep information for every product in the same format and order. That means, if you use the order [id], [description], [image_url], [shipping] for one product, you absolutely must do the same for every other product in the file. Otherwise, the data won’t be valid and your product information will end up very jumbled.
The CSV file format
  • can easily and reliably be compressed
  • doesn’t require much overhead to get started
  • requires all products to include the same attributes in the same format; therefore, it isn't useful for businesses with several different types of products and attributes
Note: The Character-Separated Value form does also include TSV (tab-separated files).

JSON: JavaScript object notation

JavaScript Object Notation or JSON can be very different from CSV for product feed use cases. Remember how CSV required that every single product included in a file follow the exact format and use all the same attributes? JSON is different. It allows you to utilize different attributes for each product entry. This is particularly helpful for businesses with different kinds of products that use different attributes - for example, if you sell both cosmetics and clothing. JSON is also unique because it's compatible between different systems, no matter the backend. You could move JSON files between OS and Windows (and plenty of other places) and not have to worry about introducing errors.
Of course, this also adds complexity and makes it easier to make mistakes. As JSON is not meant to be human-readable, it can be more difficult to recognize these errors. See for yourself.
JSON product inventory file example
The JSON file format
  • is compatible between different machines; Microsoft, Mac, Linux - it doesn’t matter
  • allows you to use different attributes and formatting per product; this is useful for businesses with very different types of products and attributes.
  • is particularly useful for web APIs, where JSON is often the preferred language

TXT: Text files

Text files are kind of like a mystery. They don’t tell you exactly what’s inside and can include a number of different formats that have been exported as plain text. For example, the content of the file could be any number of readable formats, including CSV, XML, or something else.
The TXT file format
  • can be compressed to greatly cut down on space used

XLS: Excel Spreadsheet

An Excel Spreadsheet is indicated by the .xls or .xlsx extension. Many businesses out there use these spreadsheets for managing product data, making this a very common file type. In CSV, you can only save text. However, XLS is a binary file format, which means you can save extra data like formatting or images.
The XLS file format as used in product data feeds
The XLS file format
  • includes both content and formatting
  • is useful if you rely on functionality particular to XLS such as color, formatting, or calculations
  • is often not accepted by target channels

XML: Extensible Markup Language

Extensible Markup Language files are much like JSON but with some additional features. With XML, you can again use different attributes for different products and format each product as you see fit. This is useful for businesses with different kinds of products, where not all will use the exact same attributes.
Like JSON, XML allows you to take much more control of each product. However, this means that there’s a greater chance of introducing errors. Unlike JSON, however, XML allows for a validation file that can help make certain the file is read correctly.
The XML feed file format in action
The XML file format
  • allows you to use different attributes and formatting per product which is useful for businesses with very different types of products and attributes
  • requires that each node of data be defined individually (that means you’ll be naming what each piece of data is for every product)
Note: RSS and Atom are both subtypes of XML with roughly the same functionality.

Compressed files

You might also see extensions like .zip, .gz, or .bz2, as some channels accept compressed files. For example, Google will accept an XML file with the .xml, .gz, or .bz2 extension. Of course, you should always continue to use a file format that is accepted by the target channel. Though compression is not usually required, there are benefits to compressing feed files.
Compressed files can be imported and exported more quickly and they take up less space. For example, you can expect your compressed .gz file to take up some 5-10% of the space of a similar XML or CSV. That means you can save both bandwidth and time simply by using compressed files. Of course, once compressed, the file is no longer human-readable and will need to be uncompressed before it can be edited. However, this is not a big blocker and is generally easy to do successfully.

What next?

Now that you understand the differences in file types, it should be much more clear why your team chose to use one or another. Plus, for teams who are managing and distributing product data (for example, preparing and sending it to Facebook or Amazon), it should be much less confusing when you see a channel accepts this file format but not thatone. If you want to continue this introduction to product feed aggregation and distribution, we have a great beginner article over here.

Productsup has you covered

No matter where your product data comes from or where it needs to go, Productsup has got you covered. We’re able to handle all kinds of formats, and we make it easy to collect, manage, and distribute product data in a way that fits your unique needs. Our platform is easy to use, saving you time, resources, and a lot of hassle.
New call-to-action
Hannah Augur
Senior Content Creator