Parse Census and Government Fixed-Width Data

Convert government and census fixed-width data files into CSV. Covers common public data formats, wide records, and field documentation lookup.

Data Processing

Detailed Explanation

Census and Government Data

Government agencies worldwide distribute data in fixed-width formats. The U.S. Census Bureau, Social Security Administration, Bureau of Labor Statistics, and similar organizations use positional text files with detailed record layouts documented in technical specifications.

Example: Population Data Record

010010001000100012345New York     NY36061000012345678
010020002000200009876Los Angeles  CA06037000009876543
010030003000300004567Chicago      IL17031000004567890

Typical Layout

Field Width Description
StateCode 2 FIPS state code
CountyCode 3 FIPS county code
TractCode 6 Census tract
BlockCode 4 Census block
Population 5 Total population
CityName 13 City or place name
StateAbbr 2 State abbreviation
GeoID 5 Geographic identifier
HousingUnits 9 Total housing units

Working with Government Data

  1. Find the record layout: Government agencies publish detailed field specifications (often called "data dictionaries" or "record layouts") alongside their data files. Search for the dataset name plus "record layout" or "technical documentation"

  2. Watch for FIPS codes: Many government datasets use Federal Information Processing Standards codes for geographic areas. These are zero-padded numeric codes that should be preserved (disable trimming or treat as text)

  3. Handle wide records: Some census files have records 200+ characters wide with dozens of fields. Define only the columns you need — the tool will ignore characters beyond your last defined column

  4. Multiple vintages: Government data often comes in yearly or decennial vintages. The record layout may change between years, so always check the documentation for the specific year

CSV Output Benefits

Converting to CSV enables:

  • Import into GIS software (QGIS, ArcGIS)
  • Analysis in R, Python (pandas), or Julia
  • Loading into databases for SQL querying
  • Visualization with tools like Tableau or D3.js

Use Case

Researchers and data analysts converting U.S. Census Bureau data files, Bureau of Labor Statistics employment data, or other government agency fixed-width datasets for analysis and visualization.

Try It — Fixed Width ↔ CSV Converter

Open full tool