When you need to turn messy, copied text into a clean table (CSV) or JSON, paste it into Claude and say "tidy this up like so." This guide covers practical ways to clean and convert unstructured text into structured data — building tables, standardizing formats, deduping and fixing typos, and extracting fields. (Cleaned data can drop or mis-handle rows as volume grows, so always check the result.)
1. What "data cleanup" means here
"Cleanup" sounds grand, but in practice it's tasks like these.
- Into a table: turn a flat list or roster into rows and columns (CSV)
- Standardize: align inconsistent dates (2026.6.22 / Jun 22), phone numbers, and units into one format
- Dedupe and fix typos: merge duplicate entries, correct spacing and typos
- Extract fields: pull just the values — names, amounts, dates — out of prose
2. Writing a good cleanup request
Give three things together for clean results: the source + the format you want + the rules.
"Tidy the text below into CSV. Columns in this order: name, contact, signup date. Standardize dates to YYYY-MM-DD and merge duplicate people. [paste text]"
- Name the columns (fields) and their order yourself
- State rules like "leave missing values blank" or "use one currency unit"
- Ask for the result in a code block to copy it easily
3. CSV or JSON?
- CSV: table data to paste straight into Excel or Google Sheets. Good for simple rows and columns.
- JSON: for use in programs, or when one entry holds several nested sub-values.
A simple rule: "CSV for a spreadsheet, JSON for code."
Things to watch for
- Verify large volumes: with hundreds of rows, some can be dropped or mis-sorted. Count them, and split very large inputs into batches.
- Preserve original values: tell it to "leave missing values blank" so Claude doesn't "guess" and fill them in.
- Mind sensitive data: rather than pasting real personal or customer data, mask it or use example values.
FAQ
Q. I want finer control over output formats like tables or JSON.
Output formatting in general is covered separately. → Specifying Claude's output format
Q. I need JSON output "guaranteed" in development.
The API can enforce output with a schema. → Claude API structured outputs
Q. My data is too long and gets cut off.
Reduce how much you paste at once, process in batches, and stitch the results together.
For office work in general, see Claude for work.