Insights · Nov 15, 2026 · 4 min read · FAQ

Letting customers export their data, in files they can actually use

A full export customers can open, re-import and trust: what to include, CSV and JSON done properly, big exports as background jobs, and where GDPR fits.

DATA EXPORTCSV, JSON and GDPR requests SELLWRIGHT

A customer asks for all their data: for a migration, a GDPR request, or because their security team wants to know how they would leave before signing. If the answer is a one-table CSV, or a button that times out on big accounts, a developer runs a script by hand. A good export is a feature you design, and a quiet selling point.

What should a full export include?

Everything the workspace owns, laid out so someone else can use it. We ship one ZIP per workspace:

  • A CSV and a JSON file per record type: contacts, deals, invoices, comments.
  • Uploaded files in a folder named by file ID, with original names kept in the records.
  • Settings that give the data meaning: custom fields, pipelines, tags, members and roles.
  • A README explaining each file and column, the time zone and the format version.

Each record carries its stable ID and the IDs it links to, so contacts and deals can be rejoined after a move. Timestamps are UTC instants in RFC 3339 form, such as 2026-11-15T09:30:00Z, and the README says so. Secrets stay out: API keys, password hashes, tokens and webhook secrets.

Should the export be CSV or JSON?

Both, for different readers. CSV is for people in spreadsheets; the UK's ICO names CSV, XML and JSON as examples of structured, commonly used and machine-readable formats. JSON is for systems: it keeps the nesting and nulls that CSV flattens, and RFC 8259 requires UTF-8 between systems.

  • Write IDs as strings in JSON: RFC 8259 notes that common implementations agree exactly on integers only up to (2**53)-1, so a large numeric ID can come back changed.
  • Keep field names stable and bump the format version when they change, so import scripts keep working.

How do you stop a CSV breaking, or running formulas?

Quote properly, write UTF-8 and guard text cells. RFC 4180 describes the common format: CRLF line endings, an optional header row, double quotes around fields containing commas, quotes or line breaks, and inner quotes doubled. Microsoft's Excel help says a UTF-8 CSV opens normally when saved with a byte order mark, so we add one to CSV files, never to JSON, where RFC 8259 forbids it.

Then formulas. OWASP's CSV Injection page explains that Excel and LibreOffice Calc treat a cell starting with = as a formula, and lists =, +, -, @, tab, carriage return, line feed and their full-width forms as risky first characters. Its fix: quote each field, prefix a single quote, double inner quotes.

// RFC 4180 quoting plus OWASP's formula guard
const RISKY_START = /^[=+\-@\t\r\n=+-@]/;

function csvCell(value: unknown): string {
  let text = value == null ? "" : String(value);
  if (typeof value === "string" && RISKY_START.test(text)) text = "'" + text;
  return `"${text.replace(/"/g, '""')}"`;
}

Only text gets the prefix, so negative amounts stay numbers, and full quoting stops a comma in a value starting a new cell. OWASP admits the limits: Excel may strip the escaping after a save and reopen, and no approach is safe for every app. So the CSV is guarded for people and the JSON stays exact.

How do you export a large workspace without timeouts?

Run it as a background job and tell the customer when it's ready. A large ZIP built inside one request can outlast your host's time limit; Vercel, for example, stops functions that overrun their maximum duration. The Export button creates an export record and returns 202 Accepted; a worker builds the file in batches, stores it privately and marks it ready. The record carries:

  • Status and progress on an Exports page, so nobody clicks five times.
  • A limit of one running export per workspace.
  • An email that links to the Exports page, not to the file.
  • A stated lifetime, after which the file is deleted.

On Download, the app rechecks permission and signs a short-lived link, as in accepting customer files. Amazon S3 checks a presigned URL's expiry when the request starts, so a download that begins in time finishes even if the link expires midway. Minutes are enough.

Who should be allowed to export?

Owners and admins by default, through a dedicated export permission, because a full export is the whole account in one file. A separate permission lets a customer grant it on purpose without making someone an admin. Log each request and download in the audit log.

Where does GDPR come in?

Two rights touch exports. Article 15 gives people a copy of their personal data, in a commonly used electronic form if they asked electronically. Article 20 lets them receive data they provided in a structured, commonly used and machine-readable format, where processing rests on consent or a contract and is automated, and have it sent to another controller where technically feasible. Article 12(3) asks for a response without undue delay and within one month, extendable by two more for complex or numerous requests.

The ICO accepts self-service: an automated extraction tool for portability, and secure remote access with a download for access requests. Where you process workspace data as a business customer's processor, Article 28(3)(e) requires your contract to commit you to help them answer these requests as far as possible. Check with your legal adviser which role you hold.

Where to start

Export one real workspace, then try to rebuild it from the files alone. Every gap is a missing field, link or file. Then mention the export on your security page: buyers ask how they would leave. Our web app and SaaS development service builds exports into the data model, or get in touch for a review of yours.

FAQ

Frequently asked questions

Should we offer an export API as well as a download?

Yes, once customers want scheduled or partial exports into their own systems. Use the same formats, permission check and audit events as the download, scope every call to one workspace and page through large collections. The ICO notes that machine-readable data can be made available to applications over the web through an API, which also suits sending data straight to another service.

Can customers export only part of their data?

Yes, and most days that is what they want. Let list screens export the current filtered view as CSV for everyday reporting, and keep the full workspace export for audits and moves. Run the same permission check on both, and make sure a filtered export can never include records the person could not see on screen.

How long should we keep a finished export file?

Days, not months, and state the number on the Exports page and in the email. Stop signing download links once that time passes, then delete the file. An S3 Lifecycle expiration rule on your exports prefix can do the clean-up, counting days from creation. In a versioned bucket, expiry only adds a delete marker, so add a rule for noncurrent versions too.

Are we responsible for the data after a customer downloads it?

For portability requests, the ICO says you are not responsible for what the person or the receiving organisation does with the data afterwards. You are responsible for sending it securely and to the right destination, and the ICO suggests warning people that their copy may be less protected than it was in your system. Keep downloads behind sign-in and links short-lived.

Can we charge customers for exporting their data?

Not for requests under data protection law, in most cases. GDPR makes responses to access and portability requests free, allowing a reasonable fee only for further copies under the right of access or for manifestly unfounded or excessive requests. Charging customers to take their data away also undercuts the trust a full export is meant to build.

Should an export include other people's data, like teammates' comments?

For a workspace export run by its owner, usually yes, because the workspace's records belong to that customer. A personal "download my data" export for one member is different. Articles 15(4) and 20(4) say the right to a copy and the right to portability must not adversely affect the rights and freedoms of others, so decide how to handle other people's messages and comments before you build it.

Next step

Ready for a website that sells?

Book a short call. We will look at your current site, agree what matters most and send a written scope with a fixed quote.

Book a callOr write to hello@sellwrightstudio.com