Documentation

Everything you need to know about the toolmetry npm package. 18 modules, zero dependencies, full TypeScript.

Getting Started

Quick Start
// 1. Install
npm i toolmetry

// 2. Import
import { base64, url, hash, jwt, uuid, color, text, json, password, morse, roman, cron, diff, lorem, htmlEntity, numberBase, encrypt, random } from 'toolmetry';

// 3. Use
const encoded = base64.encode('Hello, World!');
const id = uuid.v4();
const rgb = color.hexToRgb('#3B82F6');
const camel = text.toCamelCase('hello world');
const pwd = password.generate({ length: 20 });

Installation

npm
npm i toolmetry
yarn
yarn add toolmetry
pnpm
pnpm add toolmetry
bun
bun add toolmetry

Module Overview

Click on any module to see its full API reference and interactive examples.

Base64 Encode/Decode

Encoding

Encode and decode Base64 strings, with URL-safe and buffer support.

URL Encoder/Decoder

Encoding

Encode and decode URL components, build and parse query strings effortlessly.

Hash Generator

Security

Generate hashes with MD5, SHA-1, SHA-256, SHA-384, SHA-512 and HMAC support.

JWT Decoder

Security

Decode and inspect JWT tokens without verification. Check expiry and claims.

UUID Generator

Identity

Generate unique UUIDs instantly with batch creation, validation, and version inspection.

AES-256 Encrypt/Decrypt

Security

AES-256-GCM encryption for secure messages with PBKDF2 key derivation.

Random Generator

Utility

Generate random strings, numbers, hex, alphanumeric, pick, shuffle, and more.

Color Converter

Design

Convert between HEX, RGB, and HSL with lighten/darken helpers.

HTML Entity

Encoding

Encode and decode HTML entities for special characters, named, and numeric.

Number Base

Math

Convert between binary, octal, decimal, hex, and custom bases (2-36).

Text Utilities

Text

Case conversion, slugify, word/char counting, reverse, and more text utilities.

JSON Tools

Data

Format, minify, validate, flatten, and inspect JSON structures.

Password Generator

Security

Generate secure random passwords with customizable options and strength checking.

Morse Code

Encoding

Encode and decode Morse code with validation support.

Roman Numerals

Math

Convert between Arabic numbers and Roman numerals with validation.

Cron Validator

Utility

Validate and describe cron expressions with human-readable output.

Diff Checker

Utility

Compare texts line by line and find differences.

Lorem Ipsum

Content

Generate placeholder text for design and development.