Let end users write JavaScript scripts that customize your .NET application behavior without requiring a recompile
Run untrusted JavaScript in a controlled sandbox where file system access and network calls are blocked
Pass a C# object into a script and read back the modified properties or return value as a .NET type
Add a scripting engine to a workflow or rule system so non-developers can write logic in JavaScript
Install the Jint NuGet package, no external runtime or native dependencies required.
Jint is a JavaScript interpreter written in C# that runs inside .NET applications. Rather than installing a separate JavaScript runtime, you can add Jint as a NuGet package and execute JavaScript code directly from within your .NET program, without any browser or Node.js involved. The main use cases are: running JavaScript in a controlled sandbox where you limit what the code can do (for example, preventing file system access or network calls), exposing .NET objects and functions to JavaScript code (so your script can call a .NET method, access a database result, or manipulate a C# object), and adding scripting support to applications so that end users can customize behavior using JavaScript without recompiling anything. Real-world users of the library include RavenDB (a document database), EventStore, OrchardCore, and ELSA Workflows. The code examples in the README show how this works in practice. You can set a .NET method as a JavaScript function, run a script that calls it, pass a C# object into JavaScript and have the script modify its properties, or call a JavaScript function by name from C# and get the result back as a .NET value. Jint supports a wide range of modern JavaScript standards, from ECMAScript 2015 (ES6) through ECMAScript 2025, including async/await, modules, classes, BigInt, optional chaining, and many active proposals not yet in a final spec. The one notable gap is tail call optimization. Performance is reasonable for small scripts because the interpreter does not compile to .NET bytecode. If you run the same script repeatedly, caching a prepared script object avoids re-parsing it each time. Engine instances are not thread-safe and should not be shared across threads.
← sebastienros on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.