# K-means Clustering > A free k-means clustering tool that runs in the browser: drop or paste a CSV or TSV file and its rows are sorted into groups, with a chart, a profile of every group against the overall average, and the CSV back with a group column added. https://kmeans-clustering.skillsafe.ai/ ## What it does (free, no sign-in, nothing uploaded) - Reads CSV, TSV, semicolon- and pipe-separated text (quoted fields, a byte-order mark, CRLF), or cells pasted from a spreadsheet. Up to 50,000 rows are grouped. - Finds the number columns ($, %, and thousands separators are read) and leaves out ID-like columns (names such as customer_id, or a count that rises by one each row) and constant columns. Text columns with few values are shown per group but not used for grouping. - Scales each column to standard scores (or a 0 to 1 range, or raw values), then runs k-means++ (Lloyd iterations, best of several starts) from a fixed seed, so the same file and settings always give the same groups, numbered from the largest down. - Picks the number of groups by the highest mean silhouette score over 2 to 8 groups, or you choose 2 to 10. Rows with a blank in a chosen column are left out (or filled with the column average). - Draws every row coloured by group: the two columns as they are, one column as bands, or a 2-D principal component map for three or more columns. - Exports: the CSV with `group` (and `group_name`) columns, a group summary CSV, the chart as PNG or SVG, and a Markdown summary. ## Optional AI step (signed-in, metered) "Name the groups with AI" gives every group a short plain name and the up to three columns that set it apart. It is sent one summary per group (size, each column's group average, overall average and difference in standard deviations, and any category value the group has much more of) - never the rows. The page checks every claimed trait against its own averages and marks any that do not match. - API: https://kmeans-clustering.skillsafe.ai/api.html - Input fields: `task` ("name_groups"), `groups` (JSON text: [{group, rows, share_pct, columns:[{column, average, overall, z}], categories:[{column, value, share_pct, overall_pct}]}]), `facts` (JSON text: rows_grouped, groups, columns, columns_sent, columns_total, fit_score, fit, scaling). - Output: one JSON object `{"task":"name_groups","groups":[{"group":1,"name":"...","traits":[{"column":"...","dir":"high"|"low"}]}]}`. ## Source Adapted from the agent skill @dkyazzentwatwa/clustering-analyzer from dkyazzentwatwa/chatgpt-skills (https://github.com/dkyazzentwatwa/chatgpt-skills): https://skillsafe.ai/skill/@dkyazzentwatwa/clustering-analyzer . An independent JavaScript implementation; no upstream code is used.