🧹 Data Reformatter

Data Reformatter

Trim, deduplicate, sort and renumber lines of text or CSV. Drag a file in or paste it — the file is read in the browser and never uploaded.

⬆ Drop .txt or .csv here, or click to browse
📥 Input0 chars
📤 Output
Output will appear here...
Ready0 chars
// Examples
SMART TRIM
hello , world
↓
hello, world
DEDUPLICATE
apple
banana
apple
↓
apple
banana
SORT LINES
cherry
apple
banana
↓
apple
banana
cherry
Verify it yourself. Open DevTools (F12), switch to the Network tab and use the tool. Nothing appears — the readout in the header counts first-party requests made since this page loaded, and using a tool makes none.

What this cleans up

Exported data arrives dirty. A CSV pulled from a CRM will have trailing spaces around every field, the same contact three times because someone imported the list twice, and a scattering of blank rows where the export tool hit a page break. Fixing that in a spreadsheet means a formula column, a sort, a manual scan and a delete pass. Here it is four buttons.

Smart Trim collapses runs of whitespace and strips the padding either side of a delimiter, so john doe , john@email.com becomes john doe, john@email.com. Deduplicate keeps the first occurrence of each line and drops the rest, preserving the original order rather than sorting as a side effect. Sort is separate for exactly that reason.

Why the file never leaves your machine

The drag-and-drop area uses the browser's FileReader API, which hands JavaScript the contents of a file the user has explicitly chosen. It is a local read — the file is not posted anywhere, and there is no endpoint here to post it to. That matters when the list you are cleaning is a customer export, because uploading it to a third-party site is a disclosure whether or not anything bad happens afterwards.

Advertisement

Common questions

Does deduplicate change the order of my lines?

No. It keeps the first occurrence of each line where it already sits and removes later copies. If you want alphabetical order, run Sort Lines afterwards.

What file types can I drop in?

Plain text and CSV. The file is read locally with the browser's FileReader API — it is never uploaded.

Is there a size limit?

Only your device's memory. Everything runs in the page, so very large files are limited by the browser rather than by an upload cap.