FileSaver.js

The standard client-side solution for saving files in the browser via a simple saveAs() call.

Library
npm
v2.0.5
21,988stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
51/100Fair
Development Activity0
Maintenance20
Community84
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
73/100Good
Architecture78
Code Quality55
Innovation88
Learning Curve90

FileSaver.js is the de facto library for triggering file downloads directly from client-side JavaScript. It implements an HTML5 saveAs() function that takes a Blob, File, or URL and prompts the browser to save it under a chosen filename, with no server round-trip required.

Weighing in at under 6KB with zero runtime dependencies, it abstracts away the browser-specific quirks of downloading generated content, making it a foundational building block for web apps that export CSVs, PDFs, images, and other files created entirely on the client.

What You Get

  • A single saveAs(blob, filename, options) function that works across modern browsers
  • Automatic feature detection that picks the best download strategy per browser
  • Support for saving Blobs, File objects, and remote or same-origin URLs
  • Optional automatic byte-order-mark (BOM) insertion for correct UTF-8 text encoding
  • A tiny, dependency-free UMD bundle usable via npm, a bundler, or a plain script tag

Common Use Cases

  • Exporting client-generated CSV or JSON data as a downloadable file
  • Saving PDFs or images produced in the browser (e.g. from a canvas)
  • Downloading remote files while controlling the saved filename
  • Offering ‘Save’ functionality in web apps that create content entirely offline

Under The Hood

Architecture - The entire library lives in a single UMD module (src/FileSaver.js) that resolves a global scope across window, self, and global, then defines saveAs() by branching on runtime capabilities. When the a[download] attribute is supported it creates an anchor, points it at either a same-origin URL, a CORS-checked remote download, or an object URL from a Blob, and dispatches a synthetic click; on legacy IE/Edge it delegates to navigator.msSaveOrOpenBlob; and as a last resort it falls back to a FileReader that reads the blob as a data URL and opens it in a popup, with reverse-tabnabbing guards. Helper functions bom(), download(), corsEnabled(), and click() keep the branches small.

Tech Stack - It is plain ES5-style JavaScript with no runtime dependencies. The build tooling is Babel (@babel/cli with plugin-transform-modules-umd and babel-preset-minify) which transpiles the source into UMD dist bundles (dist/FileSaver.js and a minified build). Distribution is via npm and bower, and TypeScript consumers pull types from the separately published @types/file-saver package.

Code Quality - The source is compact and readable, with comments pointing at the specific browser bugs and issue numbers each code path works around. There is no automated test suite, however: the package.json test script simply echoes ‘no test specified’ and exits, so correctness relies on manual browser testing and the library’s long production track record.

API Design - The public surface is a single saveAs(blob, filename, options) function, which makes the library trivial to adopt with essentially no boilerplate. The README documents every scenario (text, URLs, canvases, File objects) with runnable snippets, and the only option, autoBom, has a sensible default. This minimal, well-documented API is the main reason it became the ecosystem standard.

Used by 41 apps in this directory

TypeScript
72%
AGPL 3.0

APITable

Low Code Platforms · Databases

15,526

API-first collaborative spreadsheet-database platform that auto-generates REST APIs and lets teams build internal tools, CRMs, and dashboards without code.

View details
53
Repo Health
77
Technical
60
Dependency
Built with
TypeScript72%
Java22%
Updated 9 months ago
JavaScript
95%
MIT

AnythingLLM

Developer Tools · Automation · AI Assistants

64,914

The all-in-one AI platform for private document chat, no-code agents, and local LLMs with zero setup friction.

View details
91
Repo Health
78
Technical
68
Dependency
Built with
JavaScript95%
Updated today
Go
52%
MIT

Bytebase

Devops

14,396

An open-source database CI/CD and DevSecOps platform — schema migration review, GitOps-driven changes, data masking, and access control across MySQL, PostgreSQL, Oracle, Snowflake, MongoDB, and more.

View details
92
Repo Health
73
Technical
69
Dependency
Built with
Go52%
TypeScript39%
Updated today
TypeScript
55%
Other

Cap

Team Chat · Video Conferencing

20,986

Open source Loom alternative with GPU-accelerated recording, instant share links, AI summaries, and full self-hosting via Docker Compose.

View details
89
Repo Health
81
Technical
65
Dependency
Built with
TypeScript55%
Rust40%
Updated yesterday
Go
76%
AGPL 3.0

Coder

Devops · Developer Tools · Code Editors

14,199

Self-hosted cloud development environments and AI coding agents — defined in Terraform, connected via WireGuard, automatically shut down when idle.

View details
93
Repo Health
90
Technical
71
Dependency
Built with
Go76%
TypeScript22%
Updated today
JavaScript
90%
Other

CodeSandbox

Code Editors · Developer Tools

13,633

Instantly ready browser-based IDE that runs full npm dependency resolution and transpilation entirely client-side, with no server needed.

View details
65
Repo Health
76
Technical
63
Dependency
Built with
JavaScript90%
Updated 1 months ago
Java
78%
GPL 3.0

DataEase

Analytics · Data Engineering · AI Assistants

24,346

Open-source BI tool with drag-and-drop dashboards, 20+ data source connectors, and AI-powered natural language queries — a self-hosted alternative to Tableau.

View details
94
Repo Health
71
Technical
66
Dependency
Built with
Java78%
Vue22%
Updated today
TypeScript
80%
Other

Directus

CMS · Low Code Platforms

37,462

Connect any SQL database and get instant REST and GraphQL APIs, a visual management Studio, and a native MCP server for AI agents — free for most organizations.

View details
93
Repo Health
82
Technical
78
Dependency
Built with
TypeScript80%
Vue18%
Updated yesterday
TypeScript
92%
MIT

Dittofeed

Marketing · Automation

2,903

Open-source omni-channel customer engagement platform for automating transactional and marketing messages via email, SMS, WhatsApp, Slack, and mobile push.

View details
54
Repo Health
75
Technical
63
Dependency
Built with
TypeScript92%
Updated 4 months ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search