POST/v1/base641 credit / call
Base64 encode / decode
Encode text to Base64 or decode Base64 back to text (Unicode-safe).
| Parameter | Type | Required | Description |
|---|
| text | string | Yes | Text (or Base64) to convert. |
| mode | string | No | encode | decode. Default: encode. |
Request
curl -X POST https://toolsonduty.com/api/v1/base64 \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"text":"hello","mode":"encode"}'
Response
{
"ok": true,
"data": {
"result": "aGVsbG8="
}
}
POST/v1/url-encode1 credit / call
URL encode / decode
Percent-encode text for safe use in URLs, or decode a percent-encoded string.
| Parameter | Type | Required | Description |
|---|
| text | string | Yes | Text to convert. |
| mode | string | No | encode | decode. Default: encode. |
Request
curl -X POST https://toolsonduty.com/api/v1/url-encode \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"text":"a b","mode":"encode"}'
Response
{
"ok": true,
"data": {
"result": "a%20b"
}
}
POST/v1/slug1 credit / call
Slug generator
Convert text into a URL-friendly slug.
| Parameter | Type | Required | Description |
|---|
| text | string | Yes | Text to slugify. |
| separator | string | No | - or _. Default: -. |
| lowercase | boolean | No | Lowercase the result. Default: true. |
Request
curl -X POST https://toolsonduty.com/api/v1/slug \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"text":"10 Best Practices"}'
Response
{
"ok": true,
"data": {
"slug": "10-best-practices"
}
}
POST/v1/case1 credit / call
Case converter
Convert text to upper, lower, title or sentence case.
| Parameter | Type | Required | Description |
|---|
| text | string | Yes | Text to convert. |
| mode | string | Yes | upper | lower | title | sentence. |
Request
curl -X POST https://toolsonduty.com/api/v1/case \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"text":"hello world","mode":"title"}'
Response
{
"ok": true,
"data": {
"result": "Hello World"
}
}
POST/v1/json/format1 credit / call
JSON format / minify
Pretty-print or minify a JSON document. Returns a 400 with the parser error for invalid JSON.
| Parameter | Type | Required | Description |
|---|
| json | string | Yes | Raw JSON text. |
| mode | string | No | format | minify. Default: format. |
Request
curl -X POST https://toolsonduty.com/api/v1/json/format \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"json":"{\"a\":1}","mode":"format"}'
Response
{
"ok": true,
"data": {
"result": "{\n \"a\": 1\n}"
}
}
POST/v1/jwt/decode1 credit / call
JWT decoder
Decode a JWT's header and payload. Does not verify the signature.
| Parameter | Type | Required | Description |
|---|
| token | string | Yes | The JWT to decode. |
Request
curl -X POST https://toolsonduty.com/api/v1/jwt/decode \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"token":"eyJhbGciOi..."}'
Response
{
"ok": true,
"data": {
"header": {
"alg": "HS256",
"typ": "JWT"
},
"payload": {
"sub": "123"
},
"signature": "..."
}
}
POST/v1/regex/test1 credit / call
Regex tester
Run a regular expression against text and return every match with its capture groups.
| Parameter | Type | Required | Description |
|---|
| pattern | string | Yes | Regular expression pattern (without slashes). |
| flags | string | No | Regex flags, e.g. "gi". Default: . |
| text | string | Yes | Text to search. |
Request
curl -X POST https://toolsonduty.com/api/v1/regex/test \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"pattern":"\\d+","text":"a1 b22"}'
Response
{
"ok": true,
"data": {
"matches": [
{
"match": "1",
"index": 1,
"groups": []
}
]
}
}
POST/v1/dev/user-agent1 credit / call
User-Agent parser
Parse a User-Agent string into browser, engine, OS and device.
| Parameter | Type | Required | Description |
|---|
| userAgent | string | Yes | User-Agent string. |
Request
curl -X POST https://toolsonduty.com/api/v1/dev/user-agent \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 Chrome/120.0 Safari/537.36"}'
Response
{
"ok": true,
"data": {
"browser": "Chrome",
"os": "Windows"
}
}
POST/v1/dev/curl-to-code1 credit / call
curl to code
Convert a curl command into equivalent fetch (JS), axios (JS) or requests (Python) code.
| Parameter | Type | Required | Description |
|---|
| curl | string | Yes | The curl command. |
| target | string | No | fetch | axios | python. Default: fetch. |
Request
curl -X POST https://toolsonduty.com/api/v1/dev/curl-to-code \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"curl":"curl https://api.example.com"}'
Response
{
"ok": true,
"data": {
"result": "const res = await fetch(\"https://api.example.com\", {\n method: \"GET\"\n});\nconst data = await res.json();"
}
}
POST/v1/dev/json-escape1 credit / call
JSON string escape / unescape
Escape a string for embedding inside a JSON document, or unescape a JSON-escaped string body.
| Parameter | Type | Required | Description |
|---|
| text | string | Yes | Text to convert. |
| mode | string | No | escape | unescape. Default: escape. |
Request
curl -X POST https://toolsonduty.com/api/v1/dev/json-escape \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"text":"line1\nline2"}'
Response
{
"ok": true,
"data": {
"result": "line1\\nline2"
}
}
POST/v1/dev/bitwise1 credit / call
Bitwise calculator
Compute AND, OR, XOR, NOT, left-shift or right-shift on two 32-bit unsigned integers.
| Parameter | Type | Required | Description |
|---|
| a | number | Yes | First operand. |
| b | number | No | Second operand (ignored for NOT). Default: 0. |
| op | string | Yes | AND | OR | XOR | NOT | LSHIFT | RSHIFT. |
Request
curl -X POST https://toolsonduty.com/api/v1/dev/bitwise \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"a":12,"b":10,"op":"AND"}'
Response
{
"ok": true,
"data": {
"result": 8
}
}
POST/v1/dev/contrast1 credit / call
WCAG contrast checker
Compute the WCAG contrast ratio between two hex colors and whether it passes AA/AAA.
| Parameter | Type | Required | Description |
|---|
| foreground | string | Yes | Foreground hex color, e.g. #000000. |
| background | string | Yes | Background hex color, e.g. #ffffff. |
Request
curl -X POST https://toolsonduty.com/api/v1/dev/contrast \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"foreground":"#000000","background":"#ffffff"}'
Response
{
"ok": true,
"data": {
"ratio": 21,
"aaNormal": true,
"aaaNormal": true
}
}
POST/v1/dev/env-json1 credit / call
.env <-> JSON
Convert a .env file to a JSON object, or a JSON object of key/value pairs to .env format.
| Parameter | Type | Required | Description |
|---|
| text | string | Yes | mode=to-json: .env text. mode=to-env: JSON text. |
| mode | string | No | to-json | to-env. Default: to-json. |
Request
curl -X POST https://toolsonduty.com/api/v1/dev/env-json \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"text":"API_KEY=abc123","mode":"to-json"}'
Response
{
"ok": true,
"data": {
"result": {
"API_KEY": "abc123"
}
}
}
POST/v1/dev/jsonpath1 credit / call
JSONPath evaluator
Evaluate a dot/bracket-notation path (e.g. $.a.b[0]) against a JSON document.
| Parameter | Type | Required | Description |
|---|
| json | string | Yes | JSON text. |
| path | string | Yes | Path expression, e.g. $.items[0].name. |
Request
curl -X POST https://toolsonduty.com/api/v1/dev/jsonpath \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"json":"{\"items\":[{\"name\":\"a\"}]}","path":"$.items[0].name"}'
Response
{
"ok": true,
"data": {
"result": "a"
}
}
POST/v1/dev/parse-url1 credit / call
URL parser
Break a URL into protocol, hostname, port, path, query parameters and hash.
| Parameter | Type | Required | Description |
|---|
| url | string | Yes | The URL to parse. |
Request
curl -X POST https://toolsonduty.com/api/v1/dev/parse-url \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/path?a=1#top"}'
Response
{
"ok": true,
"data": {
"protocol": "https:",
"hostname": "example.com"
}
}
POST/v1/dev/parse-query-string1 credit / call
Query string parser
Parse a query string (or a full URL) into key/value pairs.
| Parameter | Type | Required | Description |
|---|
| text | string | Yes | Query string or full URL. |
Request
curl -X POST https://toolsonduty.com/api/v1/dev/parse-query-string \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"text":"?a=1&b=2"}'
Response
{
"ok": true,
"data": {
"params": [
[
"a",
"1"
],
[
"b",
"2"
]
]
}
}
POST/v1/dev/meta-tags1 credit / call
Meta tag / Open Graph generator
Generate title, description, Open Graph and Twitter card meta tags for a page.
| Parameter | Type | Required | Description |
|---|
| title | string | No | Page title. Default: . |
| description | string | No | Page description. Default: . |
| url | string | No | Canonical page URL. Default: . |
| image | string | No | Social preview image URL. Default: . |
| siteName | string | No | Site name. Default: . |
| twitterCard | string | No | summary | summary_large_image. Default: summary_large_image. |
| twitterSite | string | No | Twitter @handle for the site. Default: . |
Request
curl -X POST https://toolsonduty.com/api/v1/dev/meta-tags \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"title":"My Page","description":"A great page"}'
Response
{
"ok": true,
"data": {
"result": "<title>My Page</title>..."
}
}
POST/v1/dev/cron-next-runs1 credit / call
Cron next-run calculator
Compute the next run times for a 5-field cron expression (minute hour day month weekday).
| Parameter | Type | Required | Description |
|---|
| expression | string | Yes | Cron expression, e.g. "0 9 * * 1-5". |
| count | number | No | How many upcoming runs to return (1-50). Default: 5. |
Request
curl -X POST https://toolsonduty.com/api/v1/dev/cron-next-runs \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"expression":"0 9 * * 1-5"}'
Response
{
"ok": true,
"data": {
"runs": [
"Mon 2026-01-05 09:00"
]
}
}
POST/v1/dev/http-status1 credit / call
HTTP status code reference
Look up the name, category and description of an HTTP status code. Omit the code to list all known statuses.
| Parameter | Type | Required | Description |
|---|
| code | number | No | HTTP status code, e.g. 404. |
Request
curl -X POST https://toolsonduty.com/api/v1/dev/http-status \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"code":404}'
Response
{
"ok": true,
"data": {
"code": 404,
"name": "Not Found",
"category": "4xx Client Error"
}
}
POST/v1/dev/html-entities1 credit / call
HTML entity encode / decode
Escape special HTML characters, or decode named and numeric HTML entities back to characters.
| Parameter | Type | Required | Description |
|---|
| text | string | Yes | Text to convert. |
| mode | string | No | encode | decode. Default: encode. |
Request
curl -X POST https://toolsonduty.com/api/v1/dev/html-entities \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"text":"<b>Hi & bye</b>"}'
Response
{
"ok": true,
"data": {
"result": "<b>Hi & bye</b>"
}
}
POST/v1/dev/query-string-builder1 credit / call
Query string builder
Build URL-encoded query parameters from a JSON object.
| Parameter | Type | Required | Description |
|---|
| json | string | Yes | JSON object containing parameter values. |
| includeQuestionMark | boolean | No | Prefix non-empty output with ?. Default: true. |
Request
curl -X POST https://toolsonduty.com/api/v1/dev/query-string-builder \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"json":"{\"q\":\"online tools\",\"page\":2}"}'
Response
{
"ok": true,
"data": {
"result": "?q=online+tools&page=2"
}
}
POST/v1/dev/variable-name1 credit / call
Variable name converter
Convert a phrase or identifier to a common programming naming convention.
| Parameter | Type | Required | Description |
|---|
| value | string | Yes | Phrase or existing identifier. |
| target | string | No | camel | pascal | snake | kebab | constant | title. Default: camel. |
Request
curl -X POST https://toolsonduty.com/api/v1/dev/variable-name \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"value":"public API response","target":"camel"}'
Response
{
"ok": true,
"data": {
"result": "publicApiResponse"
}
}
POST/v1/dev/mime-type1 credit / call
MIME type lookup
Find a built-in common MIME type from an extension or reverse lookup its extensions.
| Parameter | Type | Required | Description |
|---|
| value | string | Yes | Filename, extension or MIME type. |
Request
curl -X POST https://toolsonduty.com/api/v1/dev/mime-type \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"value":".json"}'
Response
{
"ok": true,
"data": {
"extension": "json",
"mimeType": "application/json",
"found": true
}
}
POST/v1/dev/json-schema1 credit / call
JSON Schema generator
Infer a draft 2020-12 JSON Schema from representative JSON.
| Parameter | Type | Required | Description |
|---|
| json | string | Yes | Valid representative JSON. |
Request
curl -X POST https://toolsonduty.com/api/v1/dev/json-schema \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"json":"{\"id\":1,\"name\":\"Ada\"}"}'
Response
{
"ok": true,
"data": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object"
}
}
POST/v1/dev/cron-parse1 credit / call
Cron expression parser
Validate and describe a five-field cron expression and calculate its next five runs.
| Parameter | Type | Required | Description |
|---|
| expression | string | Yes | Five-field cron expression. |
| from | string | No | Optional ISO date used as the schedule origin. |
Request
curl -X POST https://toolsonduty.com/api/v1/dev/cron-parse \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"expression":"*/15 9-17 * * 1-5"}'
Response
{
"ok": true,
"data": {
"valid": true,
"fields": {
"minute": "*/15",
"hour": "9-17"
}
}
}