SmartQueryTools

Add UUID Column to CSV Files Online

Add a UUID column to CSV files directly in your browser. Generate random UUIDv4 or time-ordered UUIDv7 identifiers for every row. Choose the column name and position — no upload required.

How to add UUID Column to CSV files

  1. Drop your file onto the upload area. The first 200 rows are shown.
  2. Choose the UUID version: UUIDv4 (random, the default) or UUIDv7 (time-ordered to the millisecond).
  3. Set the column name, which defaults to "id", and the position: first column (prepend) or last column (append).
  4. Click Add UUID Column. Every row gets its own identifier.
  5. Download the file in the same format you uploaded. Keep that downloaded copy, because running the tool again produces different UUIDs.

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

A research team is about to share survey responses with an outside analyst. Rows have no identifier, and the team needs one so both sides can refer to the same response in follow-up questions.

Input (CSV)

submitted_on,country,nps_score
2026-08-02,Ireland,9
2026-08-02,Canada,6
2026-08-03,Ireland,10
2026-08-04,Japan,7

Settings

  • UUID version: UUIDv4 (random)
  • Column name: response_id
  • Column position: First column (prepend)

Result

response_idsubmitted_oncountrynps_score
3f9c2b1e-8a47-4d2c-9b6e-2c71d0a5e4f82026-08-02Ireland9
b07e41d9-5c3a-4f86-a1d2-9e8f6b3c7a152026-08-02Canada6
6a2d8e5f-1b94-47c0-8e3a-f5d1c9b2a0672026-08-03Ireland10
d4c81f36-e2a9-4b75-b608-1a7e3f9d52cb2026-08-04Japan7

A new response_id column is added as the first column and the other columns are unchanged. The UUIDs shown are examples. They are random, so you get different values every time you run the tool. The 4 at the start of the third group marks them as version 4. No row order or content is used to create them.

Working with CSV files

In the downloaded CSV the UUID is plain text in the standard 36-character form, lowercase with four hyphens, for example 3f9c2b1e-8a47-4d2c-9b6e-2c71d0a5e4f8. It never needs quoting, because it contains no commas, quotes or line breaks. Most databases and pandas read it as a string. Postgres and the in-browser engine can also cast it straight to a UUID type on import. Every UUID is exactly 36 characters, so the new column adds about 37 bytes per line to the file, including the comma. For a CSV of a million rows that is roughly 37 MB extra.

The header gets the name you typed, and the rest of each line is written back as it loaded. Empty fields stay empty, and text containing commas is quoted. Values the loader converted are written in their loaded form, so a timestamp written as 2026-03-15T09:45:00 comes back as 2026-03-15 09:45:00. If you plan to import the CSV into a database, declare the column as UUID or CHAR(36) rather than a short VARCHAR. A 16-byte UUID column also makes joins and indexes smaller than a text one.

Frequently Asked Questions

Will the UUIDs in my CSV be quoted?

No. UUIDs contain only hex digits and hyphens, so the CSV writer leaves them unquoted.

Can I add UUIDs to a CSV with no header row?

The first line is read as the header. Add a header row first, otherwise your first data row becomes the column names.

Are the UUIDs the same if I run the tool twice?

No. New values are generated on every run. Keep the downloaded file as the master copy. For ids that can be recreated from the data, use Hash & Anonymise Columns on a unique column instead.

What is the difference between UUIDv4 and UUIDv7?

UUIDv4 is random. UUIDv7 starts with a millisecond timestamp followed by random bits, so ids from a later run sort after ids from an earlier one. Rows generated in the same millisecond are in random order, so a whole file processed in one run is not sorted by its UUIDv7 column. Use Add Row Numbers if you need to keep the original order.

Can two rows get the same UUID?

In practice, no. A UUIDv4 has 122 random bits, so the chance of a repeat in a file of millions of rows is far too small to matter.

Related Tools

Manage Columns in CSV Files Online

Drop or select specific columns from CSV files directly in your browser. No upload required.

Hash & Anonymise Columns in CSV Files Online

Anonymise or pseudonymise columns in CSV files by replacing values with MD5, SHA-256, or DuckDB hashes — directly in your browser. Useful for GDPR compliance and sharing data without exposing PII — no upload required.

Split CSV Files Online

Split CSV files into multiple smaller files by row count, directly in your browser.

Add UUID Column to Excel Files Online

Add a UUID column to Excel files directly in your browser. Generate random UUIDv4 or time-ordered UUIDv7 identifiers for every row. Choose the column name and position — no upload required.

Add UUID Column to Parquet Files Online

Add a UUID column to Parquet files directly in your browser. Generate random UUIDv4 or time-ordered UUIDv7 identifiers for every row. Choose the column name and position — no upload required.

Add UUID Column to JSON Files Online

Add a UUID column to JSON files directly in your browser. Generate random UUIDv4 or time-ordered UUIDv7 identifiers for every row. Choose the column name and position — no upload required.

CSV Viewer Online

View and inspect CSV files directly in your browser. Browse rows, check column names and data types — no upload required, your data stays on your device.

Convert CSV to Parquet Online

Convert CSV files to Parquet format directly in your browser. No upload required — your data never leaves your device.