Skip to content
PithLab

↑↓ to move · Enter to open · Esc to close

For developers and AI agents

PithLab API

184 exact, deterministic utility tools behind one API key: send JSON, get JSON back. Use them from your code over REST, or let Claude, Cursor and other agents call them through the built-in MCP server.

tools
184tools
free calls a day
100free calls a day
Pro calls a day
10,000Pro calls a day
calls per batch
20calls per batch
curl https://pithlab.com/api/v1/tools/json-formatter \
  -H "Authorization: Bearer $PITHLAB_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input": "{\"b\":1,\"a\":2}", "sortKeys": true}'

Quick start

  1. 1

    Create a free account and confirm your email address.

  2. 2

    Create a key on your API keys page. It's shown once, so store it as a secret (e.g. PITHLAB_KEY).

  3. 3

    POST JSON to /api/v1/tools/<slug>, or connect your agent to the MCP server.

curl https://pithlab.com/api/v1/tools/json-formatter \
  -H "Authorization: Bearer $PITHLAB_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input": "{\"b\":1,\"a\":2}", "sortKeys": true}'

Authentication

Send your key in the Authorization header as Bearer pl_live_…. Keys in query strings are refused so they don't end up in logs. Each account can have up to 10 active keys (one per app or agent makes the usage chart and request log easier to read), and you can revoke one at any time. We only store a hash of each key.

The API is served with permissive CORS, so it works from browsers too, but a key in front-end code is visible to anyone: keep keys on servers, in agents' config, or in environment variables.

Responses and errors

Every endpoint answers with the same envelope, so one check covers every tool:

Envelope
{ "ok": true, "result": { … } }
{ "ok": false, "error": { "code": "invalid_input", "message": "\"input\" is required." } }
CodeMeaning
400invalid_requestThe body isn't valid JSON, or a batch isn't shaped right.
400invalid_inputA field is missing or wrong, or the tool couldn't use the input (e.g. malformed CSV). The message says which.
401unauthorizedMissing, invalid or revoked key.
403forbiddenThe tool needs a Pro plan.
404not_foundNo such API tool, or it's switched off.
413too_largeThe body is over 256 KB.
429rate_limitedToday's quota is used up. Retry-After says when it resets.
500internalSomething broke on our side. Quote the X-Request-Id if you contact us.

Every API response carries an X-Request-Id. Your account page lists your last 50 calls with their ids, status and timing.

Rate limits

Free

100

tool calls a day

Pro

10,000

tool calls a day. See pricing

Quotas are per account across all your keys and reset at midnight UTC. A REST call, each call in a batch and each MCP tools/call counts as one; listing tools never counts. Responses carry X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset (Unix seconds); a 429 adds Retry-After. Bodies are limited to 256 KB.

Batch requests

POST /api/v1/batch runs up to 20 tool calls in one round trip. The key is checked once for the whole batch (a bad key fails everything with a 401); after that each call succeeds or fails on its own, results come back in the same order, and each call counts once against your quota.

curl https://pithlab.com/api/v1/batch \
  -H "Authorization: Bearer $PITHLAB_KEY" \
  -H "Content-Type: application/json" \
  -d '{"calls": [
    {"tool": "slug-generator", "input": {"input": "Hello World"}},
    {"tool": "case-converter", "input": {"input": "user account id", "to": "camel"}}
  ]}'

MCP for AI agents

PithLab is a remote Model Context Protocol server at https://pithlab.com/api/mcp (Streamable HTTP, stateless). Every API tool becomes an MCP tool named after its slug in snake_case, such as json_formatter, with a full input schema, so your agent can pick the right tool and fill in the arguments itself. Use the same API key and quota as the REST API.

Claude Code

Terminal
claude mcp add --transport http pithlab https://pithlab.com/api/mcp \
  --header "Authorization: Bearer pl_live_YOUR_KEY"

Cursor

~/.cursor/mcp.json
{
  "mcpServers": {
    "pithlab": {
      "url": "https://pithlab.com/api/mcp",
      "headers": {
        "Authorization": "Bearer pl_live_YOUR_KEY"
      }
    }
  }
}

Claude Desktop

claude_desktop_config.json
{
  "mcpServers": {
    "pithlab": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://pithlab.com/api/mcp",
        "--header",
        "Authorization:${PITHLAB_AUTH}"
      ],
      "env": {
        "PITHLAB_AUTH": "Bearer pl_live_YOUR_KEY"
      }
    }
  }
}

Claude Desktop's config file starts local servers, so this uses mcp-remote (needs Node.js) to bridge to the HTTP endpoint with your key.

VS Code

.vscode/mcp.json
{
  "servers": {
    "pithlab": {
      "type": "http",
      "url": "https://pithlab.com/api/mcp",
      "headers": {
        "Authorization": "Bearer pl_live_YOUR_KEY"
      }
    }
  }
}

Any other client that supports Streamable HTTP works the same way: point it at the URL and add the Authorization header. initialize and tools/list work without a key; tools/call needs one. Results come back as JSON text plus structuredContent, and tool errors (bad input, quota) set isError so the agent can read the message and correct itself. Under the hood it's plain JSON-RPC:

Raw JSON-RPC
curl https://pithlab.com/api/mcp \
  -H "Authorization: Bearer $PITHLAB_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/call",
       "params": {"name": "base64_encoder_decoder",
                  "arguments": {"input": "Hello, World!", "mode": "encode"}}}'

Example agent prompts

Once PithLab is connected, ask in plain language. The agent finds the tool and gets an exact answer instead of guessing:

  • “Pretty-print this JSON with sorted keys, then convert it to YAML.”
  • “What does the cron schedule */15 9-17 * * 1-5 mean, and when are its next five runs?”
  • “Clean the hidden characters and smart quotes out of this AI-generated paragraph.”
  • “Give me the SHA-256 and MD5 of this string, and Base64-encode it too.”
  • “Is #767676 on white readable enough for WCAG AA body text?”
  • “Decode this JWT and tell me when it expires.”
  • “Generate 5 UUIDs and a 24-character password without ambiguous characters.”
  • “What's the network, broadcast address and usable host range of 10.0.5.70/26?”

Machine-readable docs

Tool reference

Fields marked * are required; the others have defaults. Every tool also has a browser version at pithlab.com/tools/<slug>.

184 tools

AI Token Counter

Developer Tools

Count LLM tokens in text: exact counts for OpenAI's o200k_base and cl100k_base tokenizers, estimates for Claude, Gemini and Llama, and how much of common context windows it fills.

POST /api/v1/tools/ai-token-counterMCP ai_token_counter

Descriptive statistics for a list of numbers: mean, median, mode, min, max, range, geometric and harmonic means, variance, standard deviation and quartiles.

POST /api/v1/tools/average-calculatorMCP average_calculator

Bill Splitter

Calculators

Split a restaurant bill item by item (tax and tip shared in proportion to what each person ate, to the cent) or settle group trip expenses with the fewest payments.

POST /api/v1/tools/bill-splitterMCP bill_splitter

CAGR Calculator

Calculators

Compound annual growth rate: the CAGR between two values, the future value at a given CAGR, or the years needed to reach a target. Rates are returned as fractions (0.12 = 12%).

POST /api/v1/tools/cagr-calculatorMCP cagr_calculator

Character Counter

Text & Writing

Count characters (grapheme clusters), characters without spaces, UTF-8 bytes, words and lines, plus X post weighted length, SMS encoding and segments, and common platform limits.

POST /api/v1/tools/character-counterMCP character_counter

Clip Path Generator

Design & Colour

Build a CSS clip-path: polygon from points, circle, ellipse or inset, or a named preset shape (triangle, hexagon, star, arrows…). All values are percentages.

POST /api/v1/tools/clip-path-generatorMCP clip_path_generator

Simulate how a list of colours looks with each colour vision deficiency (Machado 2009 model) and flag pairs that become hard to tell apart for one chosen type. Colours only, not images.

POST /api/v1/tools/color-blindness-simulatorMCP color_blindness_simulator

Generate a palette from one base colour: complementary, analogous, triadic, tetradic, split-complementary and monochromatic harmonies, plus a 50–950 tint and shade scale as CSS variables and a Tailwind theme.

POST /api/v1/tools/color-palette-generatorMCP color_palette_generator

Credit Card Validator

Security & Privacy

Check a payment card number's format: brand from its IIN prefix, length and Luhn check digit. Does not contact any bank or check whether the card exists.

POST /api/v1/tools/credit-card-validatorMCP credit_card_validator

CSP Header Generator

Security & Privacy

Build a Content-Security-Policy from directive lines (as header, meta tag, Nginx and Apache config) with a security analysis, or analyse an existing policy for risky settings.

POST /api/v1/tools/csp-header-generatorMCP csp_header_generator

CSR Decoder

Security & Privacy

Decode a PKCS#10 certificate signing request: subject, public key, requested SANs and extensions, attributes, and whether its self-signature is valid.

POST /api/v1/tools/csr-decoderMCP csr_decoder

CSS Minifier

Developer Tools

Minify CSS with csso (optionally merging and reordering rules) or pretty-print it. Syntax problems the parser recovered from are returned as warnings.

POST /api/v1/tools/css-minifierMCP css_minifier

CSV Cleaner

Data & Conversion

Clean CSV: trim cells, drop empty rows and columns, remove duplicate rows, rename headers, fix ragged rows and drop columns. Returns the cleaned CSV and a report of what changed.

POST /api/v1/tools/csv-cleanerMCP csv_cleaner

CSV Viewer

Data & Conversion

Parse CSV into headers and rows (padded to the same width), optionally filtered by a search term and sorted by a column. Numbers and dates sort naturally.

POST /api/v1/tools/csv-viewerMCP csv_viewer

curl Converter

Developer Tools

Convert a curl command into equivalent code: JavaScript fetch, Node.js axios, Python requests, Go net/http, PHP curl or HTTPie. Handles headers, -d/--data*, -F forms, -u auth and common flags; unsupported options come back as warnings.

POST /api/v1/tools/curl-converterMCP curl_converter

Days (and a days/hours/minutes/seconds countdown) until a date, or until the next New Year, Valentine's Day, Easter, Halloween, US Thanksgiving or Christmas.

POST /api/v1/tools/days-until-calculatorMCP days_until_calculator

Dice Roller

Generators

Roll dice in standard tabletop notation (2d6+3, 4d6kh3, d20-1, 3d8+2d4) with a cryptographic random source; returns each die, the total, and the possible min, max and average.

POST /api/v1/tools/dice-rollerMCP dice_rollerRandom output

Docker Run to Compose

Developer Tools

Convert one or more docker run commands into a docker-compose.yml: ports, volumes, env vars, networks, restart policy, healthchecks, resource limits and more. Unsupported flags come back as warnings.

POST /api/v1/tools/docker-run-to-composeMCP docker_run_to_compose

Domain WHOIS Lookup

Network Tools

Registration data (RDAP, the successor to WHOIS) for a domain or a public IP address: registrar, dates, status, nameservers and DNSSEC.

POST /api/v1/tools/domain-whois-lookupMCP domain_whois_lookupRandom outputLive network check

Generate realistic fake test data (names, emails on example.com, phones, addresses, UUIDs, IPs from documentation ranges…) as JSON, CSV, SQL INSERTs or NDJSON. A seed makes the output reproducible.

POST /api/v1/tools/fake-data-generatorMCP fake_data_generatorRandom output

Fancy Text Generator

Text & Writing

Turn plain text into Unicode styles (bold, italic, script, fraktur, double-struck, monospace, circled, small caps, upside down, strikethrough…) for social bios and posts.

POST /api/v1/tools/fancy-text-generatorMCP fancy_text_generator

Find and Replace

Text & Writing

Find and replace in text, as plain text or a JavaScript regular expression, with case sensitivity and whole-word options. Returns the result and match counts.

POST /api/v1/tools/find-and-replaceMCP find_and_replace

Flexbox Playground

Design & Colour

Generate flexbox CSS and HTML for a container and its items (direction, wrap, justify, align, gaps, and per-item flex, align-self and order). Defaults are left out of the CSS.

POST /api/v1/tools/flexbox-playgroundMCP flexbox_playground

GPA Calculator

Calculators

US-style GPA on a 4.0 scale from letter grades and credits, optionally weighted for honors/AP courses and combined with a previous cumulative GPA.

POST /api/v1/tools/gpa-calculatorMCP gpa_calculator

HTML Formatter

Developer Tools

Pretty-print HTML with consistent indentation, or minify it (collapse whitespace, drop comments). <pre>, <textarea>, <script> and <style> contents are kept as written when minifying.

POST /api/v1/tools/html-formatterMCP html_formatter

HTTP Header Checker

Network Tools

Fetch a public URL once (redirects not followed, body not read) and return the status line, response headers, resolved address and timing.

POST /api/v1/tools/http-header-checkerMCP http_header_checkerRandom outputLive network check

HTTP Status Codes

Developer Tools

Look up HTTP status codes: the reason phrase, what it means, the defining specification and usage notes. Search by code (404), code prefix (40), class (4xx) or words (rate limit).

POST /api/v1/tools/http-status-codesMCP http_status_codes

Inflation at a steady annual rate: what an amount will cost in the future, or what a future amount is worth in today's money, plus purchasing power lost and doubling time.

POST /api/v1/tools/inflation-calculatorMCP inflation_calculator

JSON Diff

Data & Conversion

Compare two JSON documents structurally: lists added, removed, changed and moved values with JSONPath-style paths, plus an RFC 6902 JSON Patch that turns the original into the changed document.

POST /api/v1/tools/json-diffMCP json_diff

JSON Schema Validator

Developer Tools

Validate a JSON document against a JSON Schema (draft 2020-12 or draft-07). Returns valid, every error with its JSON Pointer path and schema keyword, and warnings about unsupported keywords.

POST /api/v1/tools/json-schema-validatorMCP json_schema_validator

JSON to Go

Developer Tools

Generate Go struct types with json tags from a sample JSON document. Integers and floats are kept apart; arrays of objects are merged into one struct.

POST /api/v1/tools/json-to-goMCP json_to_go

JSON to Python

Developer Tools

Generate Python classes (dataclasses, Pydantic v2 models or TypedDicts) with type hints from a sample JSON document. Keys become snake_case fields, with aliases where needed.

POST /api/v1/tools/json-to-pythonMCP json_to_python

JSON to Zod

Developer Tools

Generate Zod schemas (and inferred TypeScript types) from a sample JSON document, optionally detecting string formats such as email, URL, UUID and dates.

POST /api/v1/tools/json-to-zodMCP json_to_zod

JSONPath Tester

Developer Tools

Evaluate a JSONPath expression against JSON and return every match with its normalised path, JSON Pointer and value. Filters such as [?(@.price < 10)] run in a safe interpreter (no eval).

POST /api/v1/tools/jsonpath-testerMCP jsonpath_tester

JWT Encoder

Security & Privacy

Sign a JWT (HS256/384/512 with a shared secret, or RS/PS/ES with a PEM private key), or verify a token's signature and exp/nbf/iat claims.

POST /api/v1/tools/jwt-encoderMCP jwt_encoder

Key Pair Generator

Security & Privacy

Generate one new signing key pair (ECDSA, Ed25519 or RSA up to 4096 bits): PKCS#8 private key PEM, SPKI public key PEM, OpenSSH public key line and SHA-256 fingerprint. The key is created on PithLab's server and not stored; generate locally for production secrets.

POST /api/v1/tools/key-pair-generatorMCP key_pair_generatorRandom output

Check whether a year is a leap year under Gregorian rules (with the rule that applies and the previous/next leap years), or list the leap years in a range.

POST /api/v1/tools/leap-year-checkerMCP leap_year_checker

Loan Calculator

Calculators

Fixed-rate loan or mortgage repayment: monthly payment, total interest, total repaid, a yearly amortisation summary and optionally the full monthly schedule.

POST /api/v1/tools/loan-calculatorMCP loan_calculator

Magic Decoder

Developer Tools

Identify and decode an unknown string: Base64, Base32, hex, URL/percent encoding, JWTs, Unix timestamps, UUIDs, HTML entities, binary, Morse, ROT13, punycode, IP addresses and more. Returns matches ranked by confidence.

POST /api/v1/tools/magic-decoderMCP magic_decoder

Fetch a page (first 1 MB) and report its title, description, canonical, robots, Open Graph and Twitter tags, hreflang, H1s and JSON-LD types, with fixes.

POST /api/v1/tools/meta-tag-checkerMCP meta_tag_checkerRandom outputLive network check

Find the MIME type and Content-Type header for a file extension or filename, the extensions for a MIME type, or search the table. Optionally detect a file's real type from its first bytes (magic numbers).

POST /api/v1/tools/mime-type-lookupMCP mime_type_lookup

Maximum home price you can afford from income, debts, down payment and mortgage rate, using front-end and back-end debt-to-income (DTI) limits including property tax, insurance and HOA.

POST /api/v1/tools/mortgage-affordability-calculatorMCP mortgage_affordability_calculator

Passphrase Generator

Security & Privacy

Random diceware-style passphrases from the EFF large word list (7,776 words), chosen with a cryptographic random source, with their entropy in bits.

POST /api/v1/tools/passphrase-generatorMCP passphrase_generatorRandom output

Password Strength Checker

Security & Privacy

Estimate a password's strength like zxcvbn: entropy in bits, a 0–4 score, detected weak patterns (common passwords, sequences, keyboard runs, dates, repeats), estimated crack times and suggestions.

POST /api/v1/tools/password-strength-checkerMCP password_strength_checker

Port Number Lookup

Network Tools

Look up TCP and UDP port numbers: the service, what it's for, and security notes for ports that are risky to expose. Search by port, list, range or service name.

POST /api/v1/tools/port-number-lookupMCP port_number_lookup

Fairly pick random winners from a list of names (no repeats), or shuffle the names into balanced random teams. Uses a cryptographic random source.

POST /api/v1/tools/random-name-pickerMCP random_name_pickerRandom output

Random integers or decimals in an inclusive range from a cryptographic random source, with or without duplicates (unbiased at any range size), optionally sorted.

POST /api/v1/tools/random-number-generatorMCP random_number_generatorRandom output

Random Token Generator

Security & Privacy

Cryptographically random tokens for API keys, session secrets and webhooks, as hex, Base64, Base64url or Base62, with an optional prefix such as sk_live_.

POST /api/v1/tools/random-token-generatorMCP random_token_generatorRandom output

Readability Checker

Text & Writing

Readability scores for English text (Flesch reading ease, Flesch–Kincaid grade, Gunning fog, SMOG, Coleman–Liau, ARI) plus counts of long sentences, passive voice, adverbs and complex words.

POST /api/v1/tools/readability-checkerMCP readability_checker

Recipe Builder

Data & Conversion

Run text through a chain of PithLab operations in order (decode, format, convert, change case, sort, dedupe, hash…) and return each step's output.

POST /api/v1/tools/recipe-builderMCP recipe_builder

Redirect Checker

Network Tools

Follow a public URL's redirect chain hop by hop (up to 10 hops), returning each status, Location and headers, the final URL, and whether it loops.

POST /api/v1/tools/redirect-checkerMCP redirect_checkerRandom outputLive network check

Regex Tester

Developer Tools

Run a JavaScript regular expression against text: every match with its position and capture groups, an optional replacement result, and a plain-English explanation of the pattern. Runs are time-limited.

POST /api/v1/tools/regex-testerMCP regex_tester

Compare buying a home with renting and investing the difference, year by year: net worth of each, the break-even year and who is ahead at the end. Ignores taxes on gains, tax relief and PMI.

POST /api/v1/tools/rent-vs-buy-calculatorMCP rent_vs_buy_calculator

Project retirement savings from current savings, monthly contributions (optionally rising each year) and an expected return, in nominal and today's money, with the monthly income from a safe-withdrawal rate.

POST /api/v1/tools/retirement-calculatorMCP retirement_calculator

Convert a whole number to Roman numerals (1 to 3999, or up to 3,999,999 with vinculum overlines) or Roman numerals to a number. The direction is detected from the input.

POST /api/v1/tools/roman-numeral-converterMCP roman_numeral_converter

Generate schema.org JSON-LD structured data (Article, FAQ, HowTo, Product, LocalBusiness, Organization, Person, Event, Breadcrumbs, WebSite, Recipe), checked against Google's required and recommended properties.

POST /api/v1/tools/schema-markup-generatorMCP schema_markup_generator

Evaluate a maths expression safely (no eval): + − × ÷ ^, brackets, factorial (!), percent, trig and inverse trig, hyperbolic, logs, roots, exp, abs, rounding, and the constants pi, e and tau.

POST /api/v1/tools/scientific-calculatorMCP scientific_calculator

Secret Scanner

Security & Privacy

Scan text (code, config, logs, .env files) for leaked secrets such as AWS keys, GitHub and Stripe tokens, private keys, JWTs and passwords in URLs. Findings carry line, column, severity and a masked preview, never the raw secret.

POST /api/v1/tools/secret-scannerMCP secret_scanner

Security Headers Checker

Security & Privacy

Grade pasted HTTP response headers (A+ to F) for security: CSP, HSTS, framing, nosniff, Referrer-Policy, Permissions-Policy, cross-origin policies, cookies and information leaks. Nothing is fetched.

POST /api/v1/tools/security-headers-checkerMCP security_headers_checker

Security.txt Checker

Security & Privacy

Find a site's security.txt (/.well-known/security.txt, then /security.txt) and validate it against RFC 9116, or validate content you pass in.

POST /api/v1/tools/security-txt-checkerMCP security_txt_checkerRandom outputLive network check

Fetch an XML sitemap or sitemap index (up to 5 MB each, 50 child sitemaps), count URLs and report invalid XML, lastmod, http, off-host and duplicate URLs.

POST /api/v1/tools/sitemap-checkerMCP sitemap_checkerRandom outputLive network check

Sort Lines

Text & Writing

Sort lines alphabetically, naturally (1, 2, 10), by length, or shuffle them, with options to reverse, de-duplicate and drop blank lines.

POST /api/v1/tools/sort-linesMCP sort_lines

Text Cleaner

Text & Writing

Clean pasted text: strip HTML to plain text, straighten smart quotes, plain dashes and ellipses, remove emoji or non-ASCII characters, Unicode-normalise and fix line endings.

POST /api/v1/tools/text-cleanerMCP text_cleaner

Text Encrypt and Decrypt

Security & Privacy

Encrypt text with a password (AES-256-GCM, key from PBKDF2-HMAC-SHA256 with 600,000 iterations, random salt and IV) as one Base64 string, or decrypt such a string. Compatible with the PithLab Text Encryption tool.

POST /api/v1/tools/text-encryptionMCP text_encryptionRandom output

Inspect every character in text: code point, name, category, script, UTF-8/UTF-16 bytes, escapes, and warnings for invisible, bidi-control and look-alike (homoglyph) characters. Can also escape the text or strip invisible characters.

POST /api/v1/tools/unicode-character-inspectorMCP unicode_character_inspector

Unit Converter

Calculators

Convert a value between units of length, mass, temperature, volume, area, speed, data, time, energy, pressure or fuel economy. Leave out `to` to get every unit in the category.

POST /api/v1/tools/unit-converterMCP unit_converter

URL Parser

Developer Tools

Split a URL into its parts with the WHATWG URL parser: protocol, credentials, host, port (explicit, default and effective), path segments, decoded query parameters and fragment. Nothing is fetched.

POST /api/v1/tools/url-parserMCP url_parser

Suspicious Link Checker

Security & Privacy

Check a link for phishing red flags without visiting it: lookalike and punycode domains, brand names in subdomains, IP hosts, shorteners, risky TLDs and schemes, credentials in URLs. Returns a 0–100 score and a verdict. Offline heuristics, not a blocklist lookup.

POST /api/v1/tools/url-safety-checkerMCP url_safety_checker

UTM Builder

Web & SEO

Add UTM campaign parameters to a URL (replacing any existing ones, keeping other parameters and the #fragment), or parse the UTM parameters out of a tagged URL.

POST /api/v1/tools/utm-builderMCP utm_builder

Spin the Wheel

Generators

Spin a wheel of 2 to 200 entries: picks one entry uniformly at random with a cryptographic random source (the API returns the result, without the animation).

POST /api/v1/tools/wheel-spinnerMCP wheel_spinnerRandom output

Count how often each word (or two- and three-word phrase) appears in text, with optional English stop-word removal. Returns the top terms with counts and percentages.

POST /api/v1/tools/word-frequency-counterMCP word_frequency_counter