A privacy-preserving on-chain voting app on Cardano where voters prove membership with zero-knowledge proofs and votes stay anonymous.
iden3/snarkjs
JavaScript and WebAssembly library for generating and verifying zkSNARK proofs with Groth16, PLONK and FFLONK, used with circom circuits.
- Stars
- 2,042
- Forks
- 489
- Open issues
- 135
- Last commit
- last month
What is it?
snarkjs is a zero-knowledge proof toolkit implemented in JavaScript and WebAssembly. It supports the Groth16, PLONK and FFLONK proving systems and works with compiled circuits produced by the circom compiler.
Beyond proof generation and verification, the library includes the tooling for trusted setup multi-party ceremonies: creating and contributing to universal powers of tau files, running circuit-specific phase 2 contributions, applying random beacons, and verifying the resulting transcripts. Ptau formats are stated to be compatible with other ceremony implementations.
It runs in Node.js through a CLI and an API, and in the browser via a bundled build. It is distributed as an ES module, and the cryptographic core runs in WASM with worker threads for parallel computation.
Key features
- 01Generates and verifies Groth16, PLONK and FFLONK zkSNARK proofs.
- 02Runs in Node.js via CLI and API, and in the browser.
- 03Provides tools for powers of tau and phase 2 trusted setup ceremonies.
- 04Exports verification keys and Solidity verifier contracts.
- 05Computes witnesses from circom WASM output and checks them against R1CS files.
Use cases
- Building privacy-preserving applications that prove statements without revealing inputs.
- Running a trusted setup ceremony for a circom circuit.
- Publishing a zk proof verifier as an Ethereum smart contract.
- Generating zero-knowledge proofs in a web page for client-side verification.
Quick start
- 1
Install Node.js (recent LTS, v18 or later)
- 2
Install snarkjs globally with npm
npm install -g snarkjs@latest - 3
Install circom by following the official installation guide
- 4
Show the list of snarkjs commands
snarkjs --help
Things to know
- Licensed under GPL-3.0, a copyleft license that may restrict how you can use it in proprietary code.
- Works with circuits compiled by the separate circom compiler, so you need circom installed as well.
Topics
FAQ
- What is snarkjs?
- JavaScript and WebAssembly library for generating and verifying zkSNARK proofs with Groth16, PLONK and FFLONK, used with circom circuits. snarkjs is a zero-knowledge proof toolkit implemented in JavaScript and WebAssembly. It supports the Groth16, PLONK and FFLONK proving systems and works with compiled circuits produced by the circom compiler.
- Is snarkjs free to use? What license does it have?
- snarkjs is open source under the GPL-3.0 license. Check the license terms before using it in commercial products.
- Is snarkjs still maintained?
- Updated within 6 months. The last commit to snarkjs was on Oct 1, 2026.
- What can I use snarkjs for?
- Building privacy-preserving applications that prove statements without revealing inputs. Running a trusted setup ceremony for a circom circuit. Publishing a zk proof verifier as an Ethereum smart contract. Generating zero-knowledge proofs in a web page for client-side verification.
- How do I install snarkjs?
- Install Node.js (recent LTS, v18 or later) Install snarkjs globally with npm: npm install -g snarkjs@latest Install circom by following the official installation guide Show the list of snarkjs commands: snarkjs --help
- Where can I get snarkjs?
- The source code and installation instructions are on GitHub: https://github.com/iden3/snarkjs
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A decentralized operating system and node software that runs the Aleo network for zero-knowledge applications.
A zero-knowledge virtual machine that generates proofs of correct execution for programs written in Rust or other LLVM-compiled languages.
A Rust implementation of Circle STARK proving and verification over the M31 field, with a no_std verifier and SIMD prover backend.
TypeScript framework for writing zero-knowledge circuits and zkApps, with proving and verifying in browsers, Node, or for the Mina Protocol.
A portable, easy-to-use C cryptography library offering encryption, decryption, digital signatures and secure password hashing, forked from NaCl.