Edit CSV Files Without Losing Leading Zeros or Long Numbers
Keep CSV identifiers as text, check saved values, and choose an editing workflow. Two small tests cover leading zeros, long IDs, Chinese text and quoted commas.
Keep every digit in your CSV.
Treat identifiers as text and test an unchanged save first. ConvertCSV preserved the full small sample; TableConvert’s tested CSV-to-CSV route failed quoted-field checks.
Get the sample files0012300123✓123123✓1234567890123456789012345678901234567890✓1234567890123456789112345678901234567891✓ConvertCSV4/4 saved files preserve the full table
TableConvert0/4 saved files preserve the full table
- 01
Keep the source
Work on a copy. Include leading zeros, long IDs and quoted commas.
- 02
Save before editing
Check an unchanged export, then make only the intended cell edits.
- 03
Reopen and compare
Verify the header, row order and every saved field, not just the preview.
Choose the workflow before you open the file
If a recurring task already lives in a spreadsheet, use its text import controls for identifiers before loading the data. For a small one-off CSV edit, a CSV editor can be simpler: open a copy, change the intended cells, save, then verify the saved file. Our ConvertCSV route preserved this sample; the TableConvert CSV-to-CSV route did not.
Start with a small sample containing your awkward values, including quotes and commas. Check an unedited save first, then make a known edit and reopen it. If digits or leading zeros have already changed, return to the original source and reconcile by a stable record ID. Changing a display format cannot establish the missing original digits.
Scroll the table horizontally to see all 3 columns.
| Task | Starting route | Evidence and boundary |
|---|---|---|
| Repeated work already in Excel | Import identifier columns as Text | Official-document review, not a live workbook test in this guide. |
| A few cell edits in a small CSV | ConvertCSV CSV Viewer and Editor | Tested with 7 synthetic rows; preserve a source copy and verify your own export. |
| CSV with commas and quotes inside fields | Use a route that passes a quoted-field round trip | Our TableConvert 3.0.1 CSV-to-CSV run failed this sample. |
| Find missing members after editing | Compare Two Lists with one selected ID column | A subsequent membership check, not a general CSV editor or multi-field reconciler. |
The sample and the only permitted edits
The download has 7 data rows and 6 columns: record_id, text_id, code, city, status and note. Every field is expected to be a literal string. UTF-8 input files with and without a BOM contain the same parsed table. The independent expected.json was frozen before either editor was used.
The two edits are r02.status: pending → checked, and r05.note: 合成记录 5 → 已核对, "保留原文". Keep every other value, the header, all 7 rows and their order. The untouched r01.note is 合成记录 1, "仓库A". Chinese cities alternate 广州 and 上海.
A CSV has separators and quoting, but no stored spreadsheet column types. The string 00123 must stay different from 123; the two 20-digit IDs must keep their different final digits. 1E10 and 03-04 are identifiers here, not a number and a date.
Scroll the table horizontally to see all 5 columns.
| Record | text_id expected | code expected | ConvertCSV | TableConvert |
|---|---|---|---|---|
| r01 | 00123 | 1E10 | Exact in both encodings and both saves | IDs exact in tolerant diagnostic parsing; the CSV as a whole is invalid |
| r02 | 123 | 03-04 | Exact in both encodings and both saves | IDs exact in tolerant diagnostic parsing; the CSV as a whole is invalid |
| r03 | 12345678901234567890 | SKU-A | Exact in both encodings and both saves | IDs exact in tolerant diagnostic parsing; the CSV as a whole is invalid |
| r04 | 12345678901234567891 | 00123 | Exact in both encodings and both saves | IDs exact in tolerant diagnostic parsing; the CSV as a whole is invalid |
| r05 | 00012345678901234567890 | 123 | Exact in both encodings and both saves | IDs exact in tolerant diagnostic parsing; the CSV as a whole is invalid |
| r06 | 1E10 | 03-04 | Exact in both encodings and both saves | IDs exact in tolerant diagnostic parsing; the CSV as a whole is invalid |
| r07 | 03-04 | 1E10 | Exact in both encodings and both saves | IDs exact in tolerant diagnostic parsing; the CSV as a whole is invalid |
What the saved files actually contained
Both products were used in Chrome 152 on Windows on 10 October 2026. Each opened both input encodings, saved an unedited CSV, made the two specified edits, saved a second CSV and reopened both outputs. We then parsed the downloaded bytes independently with Python’s standard CSV parser. This checks the file as well as the screen.
ConvertCSV retained the six-column header, 7 rows in order, all untouched fields, Chinese text and embedded comma/quote characters. Exactly the two intended values changed. Four saved files passed strict parsing and full field comparison; four application reopens displayed the expected values.
TableConvert displayed r01.note in two cells as soon as the original CSV was imported. The unedited export already had a seventh empty header and invalid embedded quoting. After editing, r02.status was checked, but the saved r05.note was not safely escaped and split again on reopen. All four primary outputs failed. Explicitly confirming comma, Newline and Double Quote Wrap did not change the failing unedited bytes. We found no source quote-interpretation control in this interface.
The leading-zero and long-ID columns stayed intact in TableConvert’s display and tolerant diagnostic parse. That does not make its full output usable: strict CSV parsing failed. The failed files are downloadable so the boundary is reproducible.
Scroll the table horizontally to see all 4 columns.
| Product | Version / check time | Complete saved-file result | Observed scope |
|---|---|---|---|
| ConvertCSV | Web page checked 10 October 2026; no build version displayed | 4/4 saved files preserve the full table | All 7 rows x 6 fields matched before and after exactly two edits for both input encodings; all 4 saved files reopened correctly. |
| TableConvert | 3.0.1 (checked 10 October 2026) | 0/4 saved files preserve the full table | Both inputs opened and were edited, saved and reopened. The quoted comma in r01.note split into two cells; header/output gained an extra seventh column and embedded quotes were malformed. Text IDs themselves remained visible and unchanged in tolerant diagnostic parsing. Strict output was invalid CSV. |
Run the ConvertCSV route
Open the official CSV Viewer and Editor linked below. Expand Input Options; choose UTF-8, comma and First row is column names. Leave Treat double quote as data and single-quote text handling off. Keep the output header and CRLF line ending. Load input-utf8.csv or input-utf8-bom.csv. Verify the header and all seven IDs before saving.
Download CSV once without editing. Then double-click the status cell on r02, replace pending with checked, and commit. Change the note cell on r05 to the exact text above and commit. Download CSV again. Clear the editor and load each saved file; reselect UTF-8/header options if they reset. In our reopen check, Clear All reset those controls, so the header appeared as the first grid row while its file values remained correct.
Compare the reopened values and the independent parser result. The editor’s spare blank row and column were not exported in this run. Test your receiving application too: our browser round trip does not prove how a spreadsheet or an upload service will interpret the same file.
- ConvertCSV — measured CSV editing route — On 10 October 2026, ConvertCSV’s CSV Viewer and Editor preserved all 7 rows × 6 fields in our small synthetic test. Both UTF-8 inputs (with and without BOM) were saved unchanged, then with exactly two edits; all 4 downloaded CSVs passed independent field comparison and application reopen checks. We used comma, a header row, UTF-8 and standard double-quote parsing. This does not test every ConvertCSV converter or large files.
The TableConvert failure and the alternative
The tested route was CSV to CSV, file import, comma output, Newline, Double Quote Wrap on and UTF-8 BOM off. The source preview still contained the original quoted field, but the grid split it. We made the same status and note edits, downloaded the files and reopened them. This was an actual completed workflow with a failed data result.
For this kind of quoted-field CSV, use a route that passes the untouched save and edited save checks, such as the ConvertCSV route in this small test. Do not manually stitch the split cells and call that preservation. Keep the original file when an import changes the column count, and resolve the parser/settings problem before editing real records.
- TableConvert — measured CSV-to-CSV boundary — On 10 October 2026, TableConvert 3.0.1 completed opening, editing, saving and reopening our 7-row CSV, but all 4 primary saved files failed strict CSV/value checks. In both UTF-8 input variants, a quoted comma split r01.note into two cells; output gained a seventh column and malformed embedded quotes. The text IDs remained unchanged in diagnostic parsing. This is a task-specific failure in CSV-to-CSV mode, not a test of every converter.
Excel text import — document review, not hands-on tested
Microsoft documents Data → From Text/CSV and the query editor’s Text column type. For this fixture, set record_id, text_id and code to Text before loading; inspect the preview before accepting a numeric conversion. Keep the original CSV. Microsoft notes 15 significant digits of numeric precision and that later formatting does not recover previously removed zeros or digits.
The legacy Text Import Wizard also lets you choose a delimiter, a double-quote text qualifier and Text for selected columns. Use comma and check that the quoted note stays in one cell. Menus vary by Excel version. Automatic Data Conversions controls are documented for Microsoft 365 and Excel 2024; do not assume every installation has them.
We could not operate a verified Excel workbook in this run. These are official-document instructions, not an Excel export result or a measured ranking. Before relying on this route, perform the same unedited save, two edits, CSV save and reopen comparison against expected.json.
Separate data changes from file-format changes
The two inputs are 426 bytes without BOM and 429 bytes with BOM. ConvertCSV’s unedited outputs were 426 bytes and edited outputs 441 bytes, regardless of input BOM. They used UTF-8 without BOM, CRLF and valid minimal quoting. Removing the BOM did not change parsed values in this run.
TableConvert’s unedited outputs were 533 bytes and edited outputs 544 bytes, using UTF-8 without BOM and LF, with no final newline. LF instead of CRLF is a format difference. Extra columns and unescaped quotes are data/CSV validity failures. observed.json records the exact bytes, SHA-256, newline counts, strict errors and every differing field.
This is a small synthetic test, not a large-file speed test, a privacy audit, formula-safety testing or a data recovery promise. Modern CSV, Tablecruncher and other converters were not tested. For a different delimiter, multiline field or receiving system, repeat the small round trip first.
After editing: compare the intended ID column
Once the saved CSV is verified, a membership tool can find IDs missing from another list. Select the ID column, exclude the header and choose matching rules deliberately. Compare Two Lists does not edit the CSV, reconcile all fields or prove that the remaining fields are correct.
WorkToolMap and comparetwolists.net are both maintained by Jack. The linked comparison guide discloses that relationship and provides separate membership-test evidence.
Download the inputs, exact expectations and real outputs
All records are synthetic. expected.json contains every original value and the two edits; observed.json contains independent rereads, application reopen records and limits. Files labeled FAIL are preserved failed exports, not corrected examples. README.md explains the settings and verification command. manifest.json provides exact download byte counts and SHA-256.
- convertcsv-utf8-bom-edited.csv Synthetic data. See README and observed.json for scope.
- convertcsv-utf8-bom-unedited.csv Synthetic data. See README and observed.json for scope.
- convertcsv-utf8-edited.csv Synthetic data. See README and observed.json for scope.
- convertcsv-utf8-unedited-initial.csv Synthetic data. See README and observed.json for scope.
- convertcsv-utf8-unedited.csv Synthetic data. See README and observed.json for scope.
- expected.json Synthetic data. See README and observed.json for scope.
- input-utf8-bom.csv Synthetic data. See README and observed.json for scope.
- input-utf8.csv Synthetic data. See README and observed.json for scope.
- observed.json Synthetic data. See README and observed.json for scope.
- README.md Synthetic data. See README and observed.json for scope.
- FAIL — tableconvert-settings-confirmed.csv Synthetic data. Preserved failed export; not safe to use as a corrected table.
- FAIL — tableconvert-utf8-bom-edited.csv Synthetic data. Preserved failed export; not safe to use as a corrected table.
- FAIL — tableconvert-utf8-bom-unedited.csv Synthetic data. Preserved failed export; not safe to use as a corrected table.
- FAIL — tableconvert-utf8-edited.csv Synthetic data. Preserved failed export; not safe to use as a corrected table.
- FAIL — tableconvert-utf8-unedited.csv Synthetic data. Preserved failed export; not safe to use as a corrected table.
- verify.py Synthetic data. See README and observed.json for scope.
- manifest.json Synthetic data. See README and observed.json for scope.
Common questions
Why can 00123 become 123?
CSV stores text and separators, not spreadsheet column types. A receiving application may interpret an identifier as a number. Import identifier columns as text and check the saved values.
Can formatting recover digits that have already changed?
Changing the display format cannot establish missing original digits. Return to an unchanged source and reconcile records by a stable ID. The tests here do not establish a recovery method.
Are correct ID columns enough to trust an export?
No. In the TableConvert run the IDs remained visible, but quoted fields split and strict CSV parsing failed. Check the entire table, including embedded commas, quotes and non-English text.
Does removing a UTF-8 BOM mean the data changed?
Not necessarily. ConvertCSV removed the BOM in this test while preserving every parsed value. Encoding and line endings should be checked separately from field values, and your receiving system should be tested too.
Task verification and evidence
Third-party CSV editing tests with one synthetic table. Tested 10 October 2026. ConvertCSV passed this sample; TableConvert 3.0.1 failed the tested CSV-to-CSV route. Original failed exports are preserved.
These checks apply to the stated inputs and route. General pricing, platform and processing fields keep their own source dates and unknown values.