Developers
OpenToolLab Toolkit
A tiny, dependency-free utility bundle backed by the same in-browser code that powers our tools. No network calls, no tracking — everything runs on the client.
Install with one script tag
Add the script anywhere on your page, then use the global OpenToolLab object.
<script src="https://opentoollab.com/toolkit.min.js" defer></script>
<script>
OpenToolLab.formatJson('{"a": 1}');
// '{
"a": 1
}'
OpenToolLab.generateUuid();
// '5f2a...-4d81-9c2b-...'
</script>~2 KB minified, zero dependencies, works in every modern browser. Served from the same privacy-first CDN as OpenToolLab.
API reference
OpenToolLab.formatJson(input, indent = 2) → string | null
Pretty-prints a JSON string. Returns null if the input is not valid JSON.
OpenToolLab.minifyJson(input) → string | null
Removes all insignificant whitespace from a JSON string.
OpenToolLab.generateUuid() → string
Generates a cryptographically random RFC 4122 v4 UUID.
OpenToolLab.hashText(input, algorithm = "SHA-256") → Promise<string>
Returns a lowercase hex digest of the input via the Web Crypto API.
OpenToolLab.base64Encode(input) → string
Encodes a UTF-8 string to base64.
OpenToolLab.base64Decode(input) → string
Decodes a base64 string back to UTF-8.
OpenToolLab.slugify(input) → string
Converts any text into a URL-safe slug.
License & source
The toolkit is MIT-licensed and open source. It is built from the same modules that run OpenToolLab's tools, so you get exactly the behavior you can test on this site — with the same privacy guarantees.