Get NAICS Codes in CSV Format
A practical review of converting NAICS code lists to CSV or TSV: what the conversion changes, where it breaks, and how to keep codes, titles and hierarchy intact.
Many people want NAICS codes in CSV format so they can filter industries in a spreadsheet, load them into a database, or attach them to records in a CRM or grant application. CSV is usually the right choice for that work. It also has a few failure points, and they matter more for classification codes than for ordinary text. This review covers what a CSV conversion actually does to a NAICS list, when the result stays accurate and usable, and when another format works better.
What NAICS codes are, briefly
NAICS, the North American Industry Classification System, assigns numeric codes to industries. The structure is hierarchical. A two-digit sector breaks down into progressively narrower levels, ending at six-digit national industries. A few sectors are written as ranges instead of a single two-digit number. The system is revised periodically, and codes and titles can change between revisions. The hierarchy and the versioning are the two features most likely to be damaged by a careless conversion.
Is a CSV file suitable for your use?
CSV is a good fit if you need a machine-readable list of codes and titles to sort, filter, join to other data, or import into software. Its main benefit is portability: almost every spreadsheet, database and programming language can read it. The main tradeoff is that CSV stores only rows of text values. It has no data types, no formatting, and no built-in way to show that one code sits beneath another. Anything the source conveyed through indentation, bold headings or nested layout has to become an explicit column, or it is lost.
Plain text or a formatted document is the better choice if people will read the list rather than process it. Examples include looking up a code for a form or presenting a short list in a report. In those cases a readable indented list or a formatted table communicates the hierarchy better than a delimited file does.
| Format | Best for | Main risk |
| CSV (comma-separated) | Imports, databases, scripts, broad compatibility | Titles containing commas must be quoted correctly; spreadsheets may auto-convert values |
| TSV (tab-separated) | Data with many commas in text fields | Tabs are invisible, so stray tabs or spaces are hard to spot; some tools expect commas by default |
| Spreadsheet workbook | Human review with formatting and frozen headers | Less portable; formatting does not carry over when exported back to CSV |
| Indented plain text | Reading and browsing the hierarchy | Not structured for filtering or joining |
What the conversion actually changes
Converting a NAICS list to CSV changes the structure of the stored file, not just how it looks. Each code-and-title pair becomes a line, and the fields are separated by a delimiter character. Fields that contain the delimiter must be wrapped in double quotes. A double quote inside a quoted field is written as two double quotes. These characters are part of the saved text and every program that reads the file depends on them.
Presentation is a separate layer. A spreadsheet that opens the file draws a grid, aligns columns and may format numbers, but none of that is saved in the CSV unless you export again. That is also why styling cannot carry through. Bold sector names, indented subcategories or decorative fonts in a source table do not exist in CSV. It is plain text by definition. This is a different kind of transformation from text reversal, mirrored glyphs or Unicode font substitution, which change the characters themselves. A sound CSV conversion should leave every code digit and title character exactly as it was.
Industry titles often contain commas, so quoting is the step most likely to go wrong. The illustrative snippet below shows correct quoting. The rows are meant to demonstrate the format. Before relying on any titles, check them against the official NAICS revision you intend to use.
code,title,level,parent_code
11,"Agriculture, Forestry, Fishing and Hunting",2,
111,Crop Production,3,11
1111,Oilseed and Grain Farming,4,111
11111,Soybean Farming,5,1111
111110,Soybean Farming,6,11111
Without the quotes on the first data row, a reader would split the title at each comma and push the remaining text into the wrong columns. The level and parent_code columns show how to keep the hierarchy explicit. The parent can be derived from the code prefix, but writing it out makes filtering and joining simpler and avoids relying on each user to work it out correctly. Sector ranges need a deliberate rule, such as storing the range as text or listing each two-digit value separately, so that child codes still link to a parent.
Will the file stay accurate after opening, copying or sharing?
The file itself is stable plain text. Errors usually happen when it is opened in a spreadsheet and saved again. Watch for these issues:
- Automatic type conversion: many spreadsheet programs treat a column of digits as numbers and may reformat a code or interpret a range-style value as something else. Import the code column as text instead of opening the file directly.
- Encoding: titles in English are plain ASCII, but French or Spanish versions used alongside NAICS contain accented characters. Save and import as UTF-8, and check whether the receiving tool expects a byte-order mark.
- Regional delimiters: in some locales, spreadsheet software uses semicolons as the default list separator, so a comma-delimited file may open as a single column. Specify the delimiter during import.
- Mixed revisions: combining codes from different NAICS revisions in one file produces codes that look valid but do not match the intended definitions. Add a column recording the revision, and use an official concordance when moving between versions.
- Lost descriptions: a code-and-title CSV usually omits full industry definitions, index entries and cross-references. If your work depends on those, such as classifying a business correctly, keep the official descriptive material alongside the file.
Copying rows out of a spreadsheet and pasting them into an email or document generally produces tab-separated text, not CSV. That works for a quick share but should not be treated as the canonical file. Send the CSV itself, or a TSV deliberately exported as one, when the recipient will process the data.
For accessibility, a CSV opened in a spreadsheet presents a grid that assistive technology can usually navigate by row and column, especially with a clear header row. The raw file read aloud as text is much harder to follow, because every delimiter and quote mark is announced or skipped inconsistently. No scoped test with a specific screen reader was available for this review. Treat this as a general expectation rather than a verified result for any particular tool. If people will read the list rather than software, provide a plain-text or formatted-table equivalent with readable headings and indentation.
Recommendation
Use CSV when NAICS codes will be filtered, joined or imported, and set these rules up from the start: quote titles correctly, import codes as text, save as UTF-8, add explicit level, parent and revision columns, and keep the official definitions available for classification decisions. Choose TSV if your titles or downstream tools make comma quoting fragile. Use plain text or a formatted table when the main audience is a person looking up or reading codes.
Evidence gaps
This review did not examine any specific NAICS download, converter or source file. It does not confirm which official formats are currently published, the exact number of codes in any revision, or how a particular spreadsheet or assistive technology handles a given file. Before production use, verify codes and titles against the official source for the revision you need and test the import in the tools you actually use.