SmartQueryTools

Extract Unique Values from CSV Files Online

Extract all distinct values from any column in CSV files directly in your browser. Download the unique values list — no upload required.

How to extract Unique Values from CSV files

  1. Drop your file onto the upload area. The row count is shown and the first column is pre-selected.
  2. Choose the column you want to list in the Column dropdown.
  3. Click Extract Unique Values. The distinct values appear in a single column called value, sorted in ascending order.
  4. Click Download to save the list in the same format you uploaded, with _unique added to the file name.

Your file is processed locally in your browser and is never uploaded. The free limit is 50 MB per file; larger files work if your device has the memory for them.

Worked example

An HR team is building a department filter for a careers page from a job postings export. They need the list of departments that actually appear in the data.

Input (CSV)

job_id,title,department,remote
J-310,Backend Engineer,Engineering,true
J-311,Account Executive,Sales,false
J-312,QA Analyst,engineering,true
J-313,Payroll Specialist,Finance,false
J-314,Office Coordinator,,false
J-315,Sales Manager,Sales,false

Settings

  • Column: department

Result

value
Engineering
Finance
Sales
engineering

Six rows give four distinct values. Sales appears twice but is listed once. The null department is left out. Engineering and engineering are different values because matching is case-sensitive. The sort puts all capitalised words before lowercase ones, which is why engineering comes last. The list reveals a data entry problem to fix before it goes on the site.

Working with CSV files

How the list is sorted depends on the type the CSV column was detected as. A column that holds only numbers is sorted numerically: 2, 10, 100. If a single value in the column is text, the whole column is text and it sorts character by character: 10, 100, 2. If the order looks wrong, check the column type with the Validate tool.

Empty CSV fields are read as nulls and are left out of the list, so the output never starts with a blank entry. The downloaded CSV has a single column with the header value and one distinct value per line, which pastes cleanly into a lookup sheet or a SQL IN (...) list. The list is written as a CSV like any other, so a value containing a comma or a quote is wrapped in double quotes. That keeps the file valid for other tools. Strip the quotes if you paste the values straight into code.

Frequently Asked Questions

Why are my numbers sorted as 1, 10, 2 in the CSV output?

The column contains at least one non-numeric value, so it was read as text and sorted alphabetically. Clean or remove the text values and the list will sort numerically.

Does the unique values CSV include a header?

Yes. The single column is named value. Rename it with the Rename tool if your import needs a different header.

Are null values included in the list?

No. Nulls are excluded. Empty CSV fields and blank Excel cells load as nulls, so they are left out too. An empty string in a JSON or Parquet file is a real value and is listed. Use Count By if you need to know how many rows are null.

Is the matching case-sensitive?

Yes. "Sales" and "sales" are listed separately, and capitalised values sort before lowercase ones. Run Convert Case first if you want them merged.

Is there a limit on the number of unique values?

The on-screen table shows the first 500 values. The heading gives the full count, and the downloaded file contains all of them, limited only by your browser's memory.

Related Tools