# FileSaver.js

An HTML5 saveAs() FileSaver implementation

Repository: https://github.com/eligrey/FileSaver.js
Canonical: https://ross.abutalabs.com/products/filesaverjs
Homepage: https://eligrey.com/blog/saving-generated-files-on-the-client-side/
Language: JavaScript
License: NOASSERTION
License Family: other
Last push: 2023-03-01T13:55:08+00:00
Link (homepage): https://eligrey.com/blog/saving-generated-files-on-the-client-side/
Link (site_page): https://eligrey.com/about

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 5528, "days_push": 1281, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 21987, forks 4301 (observed 2026-08-28T04:11:32.243589+00:00)

## What it is
FileSaver.js is a small JavaScript library that implements the HTML5 FileSaver saveAs() interface for saving files generated on the client side in the browser. It works with Blobs and canvas.toBlob() to let web apps trigger file downloads with custom filenames without a server round-trip.

## Use cases
- save generated files on the client side in a web app
- add a save as button to a browser-based text or markdown editor
- download a canvas drawing as an image file
- export data as csv or json from a web application
- save files offline without sending data to a server
- trigger file downloads with custom filenames across browsers

## When to choose
- your web app generates files in the browser (text, canvas, blobs) and needs a reliable cross-browser saveAs()
- you need to support older browsers lacking native Blob or download support via the Blob.js polyfill
- you want a tiny dependency-free client-side download solution

## When to avoid
- the file comes from a server - use the Content-Disposition attachment header instead
- you need to save files larger than the browser's blob size limit or stream data asynchronously - use StreamSaver.js
- you only target modern browsers with native File System Access API support

## Facets
- artifact type: library
- maturity: maintenance
- function: file-upload, developer-tools
- domain: web-development, frontend, files
- platform: browser, cross-platform
- tags: client-side-file-saving, blob, saveas, download-files, browser-polyfill, javascript

## Member repositories
- eligrey/FileSaver.js (main) score 23
- eligrey/Blob.js (plugin) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:32.243589+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T16:57:44.813274+00:00, confidence not recorded.
  - readme: https://github.com/eligrey/FileSaver.js (fetched 2026-08-28T04:11:32.243589+00:00, sha d4206fe01385)
  - homepage: https://eligrey.com/blog/saving-generated-files-on-the-client-side/ (fetched 2026-08-29T07:56:47.385925+00:00, sha 3693baec171f)
  - site_page: https://eligrey.com/about (fetched 2026-08-29T07:56:47.390749+00:00, sha 7a18cdbecbd6)
  - registry_npm: https://registry.npmjs.org/filesaver.js (fetched 2026-08-29T07:56:47.393416+00:00, sha 186fae797608)
- Data as of 2026-08-30T08:39:29.467469+00:00.
