Snappy, the Snaplet mascot cat uses JavaScript to obfuscate sensitive data in the Snaplet web app

JavaScript Transformations and Proxy - better together!

Obfuscate your data and validate your transformations in


Update: You can now view your data transformations from within the Snaplet web app!

To create the best experience for our users, we constantly reiterate and refine our product according to your feedback. Since publishing the post below, more and more users requested the ability to validate their data transformations before restoring a snapshot, all from within the online app. So we created the Snapshot Data Browser.

-> Read the blog post: X-ray vision for your snapshots - introducing the Snapshot Data Browser

Updated on 22 November 2023


Some things in life are just better together.

Toast and butter. Macaroni and cheese. Burgers and fries. Gin and tonic. Add one more to that list today, as we reveal JavaScript Transformations and Proxy. Awesome individually, even better when they work together.

JavaScript Transformations - data anonymization as simple as code.

Let’s talk JavaScript Transformations first: We know that coding against no data (or unrealistic data) sucks. We built Snaplet so you could spend more time coding against production-accurate data, and less time doing everything else, like wrangling that data out of your database to code against. Until now, our domain specific language has allowed you to de-identify your data easily enough, albeit with a language that we invented, so you had to look up a reference for how to transform values. We want to keep you in flow; keep you focused on coding, which is why we now integrate into your development workflow by providing you with the ability to safely transform your data using a language you already know: JavaScript! 🧑‍💻

We didn’t stop there though. While JavaScript functions are immensely powerful and capable of transforming personal information in useful ways, in practice using them could become quite tedious: imagine writing a JS function that uses conditional logic, and having to capturing an entire snapshot to test it, then finding a bug, fixing it, and repeating that process? We wanted to unlock the ability for developers to “live reload” the data in their database, so we’re introducing snaplet proxy, a genius little proxy that lives between your code environment and your database.
Proxy intercepts and transforms traffic between your database client and the database, allowing you to test and change your JavaScript transformations in real-time without any changes to the original database! No snapshot captures, no reloading, just real-time transformations in your editor. Even better - once you’ve transformed your data, you can easily share your configuration with your teammates with the new snaplet config push command, making it easy for everyone on your team to work against the same data.

Watch Snaplet co-founder Peter Pistorius explain more about how JavaScript Transformations and Proxy work:

JavaScript Transformations and Proxy play nicely with Copycat, our library for generating deterministic fake values. You can also continue to use Faker to create fake data if you’re more used to that.

We hope you find JavaScript Transformations and Proxy useful. It’s our mission to give you safe, production-accurate data effortlessly in your dev environment, so you can focus on shipping. If you’ve got a request for a Snaplet feature that’d help you ship, come tell us about it in our Discord, and we’d love to hook you up with some swag!

Read more:

-> See how to obfuscate sensitive data with Snaplet and Javascript.

-> See why Snaplet snapshot is a better database dump (Postgres pg_dump).

-> See how Snaplet generate is a better seed script.

Check out the documentation >

Jian Reis
May 2, 2024