# Tidy Byte Tools API
> Small, fast text and data tools at https://tidybytetools.tidybytetools.workers.dev. Free to try. Paid per-call billing is not live.
Home: https://tidybytetools.tidybytetools.workers.dev/
Pricing: https://tidybytetools.tidybytetools.workers.dev/pricing
Pricing JSON: https://tidybytetools.tidybytetools.workers.dev/pricing.json
OpenAPI: https://tidybytetools.tidybytetools.workers.dev/openapi.json
MCP (Streamable HTTP): https://tidybytetools.tidybytetools.workers.dev/mcp
MCP discovery: https://tidybytetools.tidybytetools.workers.dev/.well-known/mcp
Auth probe: GET https://tidybytetools.tidybytetools.workers.dev/v1/probe
Create a free key: POST https://tidybytetools.tidybytetools.workers.dev/keys
Website: https://tidybytetools.github.io
Paid bulk actors: https://apify.com/tidybytetools
## Auth
Anonymous use is allowed (50 calls per IP per UTC day).
A free key from POST /keys raises the cap to 200 calls per key per UTC day.
Send the key as `Authorization: Bearer tbt_...`, `X-Api-Key`, or `?api_key=`. Never in the URL path.
A bad key returns HTTP 401 with `{ "ok": false, "error": "invalid_api_key" }`.
## Tools
### Repair JSON
POST https://tidybytetools.tidybytetools.workers.dev/v1/json-repair
Fix broken or incomplete JSON, including text from language models.
Example body: {"text":"{name: 'Ada', ok: True,}"}
curl:
```
curl -sS https://tidybytetools.tidybytetools.workers.dev/v1/json-repair \
-H "Content-Type: application/json" \
-d '{"text":"{name: 'Ada', ok: True,}"}'
```
Python:
```
import requests
r = requests.post(
"https://tidybytetools.tidybytetools.workers.dev/v1/json-repair",
json={
"text": "{name: 'Ada', ok: True,}"
},
# headers={"Authorization": "Bearer tbt_YOUR_KEY"},
)
print(r.json())
```
JavaScript:
```
const res = await fetch("https://tidybytetools.tidybytetools.workers.dev/v1/json-repair", {
method: "POST",
headers: {
"Content-Type": "application/json",
// Authorization: "Bearer tbt_YOUR_KEY",
},
body: JSON.stringify({
"text": "{name: 'Ada', ok: True,}"
}),
});
const data = await res.json();
console.log(data);
```
### Base64 encode or decode
POST https://tidybytetools.tidybytetools.workers.dev/v1/base64
Turn text into Base64, or Base64 back into text. URL-safe and data URIs work too.
Example body: {"action":"encode","text":"hello"}
curl:
```
curl -sS https://tidybytetools.tidybytetools.workers.dev/v1/base64 \
-H "Content-Type: application/json" \
-d '{"action":"encode","text":"hello"}'
```
Python:
```
import requests
r = requests.post(
"https://tidybytetools.tidybytetools.workers.dev/v1/base64",
json={
"action": "encode",
"text": "hello"
},
# headers={"Authorization": "Bearer tbt_YOUR_KEY"},
)
print(r.json())
```
JavaScript:
```
const res = await fetch("https://tidybytetools.tidybytetools.workers.dev/v1/base64", {
method: "POST",
headers: {
"Content-Type": "application/json",
// Authorization: "Bearer tbt_YOUR_KEY",
},
body: JSON.stringify({
"action": "encode",
"text": "hello"
}),
});
const data = await res.json();
console.log(data);
```
### Hash text
POST https://tidybytetools.tidybytetools.workers.dev/v1/hash
SHA-256, SHA-1, MD5, and SHA-512 checksums of text.
Example body: {"text":"hello","algorithms":["sha256","md5"]}
curl:
```
curl -sS https://tidybytetools.tidybytetools.workers.dev/v1/hash \
-H "Content-Type: application/json" \
-d '{"text":"hello","algorithms":["sha256","md5"]}'
```
Python:
```
import requests
r = requests.post(
"https://tidybytetools.tidybytetools.workers.dev/v1/hash",
json={
"text": "hello",
"algorithms": [
"sha256",
"md5"
]
},
# headers={"Authorization": "Bearer tbt_YOUR_KEY"},
)
print(r.json())
```
JavaScript:
```
const res = await fetch("https://tidybytetools.tidybytetools.workers.dev/v1/hash", {
method: "POST",
headers: {
"Content-Type": "application/json",
// Authorization: "Bearer tbt_YOUR_KEY",
},
body: JSON.stringify({
"text": "hello",
"algorithms": [
"sha256",
"md5"
]
}),
});
const data = await res.json();
console.log(data);
```
### Shape text into JSON
POST https://tidybytetools.tidybytetools.workers.dev/v1/json-shaper
Turn key-value lines, CSV, or a Markdown table into clean JSON.
Example body: {"text":"name: Ada\nyear: 1815"}
curl:
```
curl -sS https://tidybytetools.tidybytetools.workers.dev/v1/json-shaper \
-H "Content-Type: application/json" \
-d '{"text":"name: Ada\nyear: 1815"}'
```
Python:
```
import requests
r = requests.post(
"https://tidybytetools.tidybytetools.workers.dev/v1/json-shaper",
json={
"text": "name: Ada\nyear: 1815"
},
# headers={"Authorization": "Bearer tbt_YOUR_KEY"},
)
print(r.json())
```
JavaScript:
```
const res = await fetch("https://tidybytetools.tidybytetools.workers.dev/v1/json-shaper", {
method: "POST",
headers: {
"Content-Type": "application/json",
// Authorization: "Bearer tbt_YOUR_KEY",
},
body: JSON.stringify({
"text": "name: Ada\nyear: 1815"
}),
});
const data = await res.json();
console.log(data);
```
### Format or minify JSON
POST https://tidybytetools.tidybytetools.workers.dev/v1/json-format
Pretty-print or shrink valid JSON.
Example body: {"text":"{\"a\":1,\"b\":[2,3]}","mode":"pretty"}
curl:
```
curl -sS https://tidybytetools.tidybytetools.workers.dev/v1/json-format \
-H "Content-Type: application/json" \
-d '{"text":"{\"a\":1,\"b\":[2,3]}","mode":"pretty"}'
```
Python:
```
import requests
r = requests.post(
"https://tidybytetools.tidybytetools.workers.dev/v1/json-format",
json={
"text": "{\"a\":1,\"b\":[2,3]}",
"mode": "pretty"
},
# headers={"Authorization": "Bearer tbt_YOUR_KEY"},
)
print(r.json())
```
JavaScript:
```
const res = await fetch("https://tidybytetools.tidybytetools.workers.dev/v1/json-format", {
method: "POST",
headers: {
"Content-Type": "application/json",
// Authorization: "Bearer tbt_YOUR_KEY",
},
body: JSON.stringify({
"text": "{\"a\":1,\"b\":[2,3]}",
"mode": "pretty"
}),
});
const data = await res.json();
console.log(data);
```
### Chunk Markdown
POST https://tidybytetools.tidybytetools.workers.dev/v1/md-chunk
Split Markdown into heading-aware chunks for search and RAG.
Example body: {"text":"# Title\n\nHello.\n\n## Part\n\nMore text.","maxChars":400}
curl:
```
curl -sS https://tidybytetools.tidybytetools.workers.dev/v1/md-chunk \
-H "Content-Type: application/json" \
-d '{"text":"# Title\n\nHello.\n\n## Part\n\nMore text.","maxChars":400}'
```
Python:
```
import requests
r = requests.post(
"https://tidybytetools.tidybytetools.workers.dev/v1/md-chunk",
json={
"text": "# Title\n\nHello.\n\n## Part\n\nMore text.",
"maxChars": 400
},
# headers={"Authorization": "Bearer tbt_YOUR_KEY"},
)
print(r.json())
```
JavaScript:
```
const res = await fetch("https://tidybytetools.tidybytetools.workers.dev/v1/md-chunk", {
method: "POST",
headers: {
"Content-Type": "application/json",
// Authorization: "Bearer tbt_YOUR_KEY",
},
body: JSON.stringify({
"text": "# Title\n\nHello.\n\n## Part\n\nMore text.",
"maxChars": 400
}),
});
const data = await res.json();
console.log(data);
```
### Diff two texts
POST https://tidybytetools.tidybytetools.workers.dev/v1/text-diff
Line-level diff of two strings, plus a unified patch.
Example body: {"a":"one\ntwo\nthree","b":"one\ntwo changed\nthree"}
curl:
```
curl -sS https://tidybytetools.tidybytetools.workers.dev/v1/text-diff \
-H "Content-Type: application/json" \
-d '{"a":"one\ntwo\nthree","b":"one\ntwo changed\nthree"}'
```
Python:
```
import requests
r = requests.post(
"https://tidybytetools.tidybytetools.workers.dev/v1/text-diff",
json={
"a": "one\ntwo\nthree",
"b": "one\ntwo changed\nthree"
},
# headers={"Authorization": "Bearer tbt_YOUR_KEY"},
)
print(r.json())
```
JavaScript:
```
const res = await fetch("https://tidybytetools.tidybytetools.workers.dev/v1/text-diff", {
method: "POST",
headers: {
"Content-Type": "application/json",
// Authorization: "Bearer tbt_YOUR_KEY",
},
body: JSON.stringify({
"a": "one\ntwo\nthree",
"b": "one\ntwo changed\nthree"
}),
});
const data = await res.json();
console.log(data);
```
### YAML ↔ JSON
POST https://tidybytetools.tidybytetools.workers.dev/v1/yaml-json
Convert a common YAML subset to JSON, or JSON to YAML.
Example body: {"direction":"to-json","text":"name: Ada\nyears: [1815, 1852]"}
curl:
```
curl -sS https://tidybytetools.tidybytetools.workers.dev/v1/yaml-json \
-H "Content-Type: application/json" \
-d '{"direction":"to-json","text":"name: Ada\nyears: [1815, 1852]"}'
```
Python:
```
import requests
r = requests.post(
"https://tidybytetools.tidybytetools.workers.dev/v1/yaml-json",
json={
"direction": "to-json",
"text": "name: Ada\nyears: [1815, 1852]"
},
# headers={"Authorization": "Bearer tbt_YOUR_KEY"},
)
print(r.json())
```
JavaScript:
```
const res = await fetch("https://tidybytetools.tidybytetools.workers.dev/v1/yaml-json", {
method: "POST",
headers: {
"Content-Type": "application/json",
// Authorization: "Bearer tbt_YOUR_KEY",
},
body: JSON.stringify({
"direction": "to-json",
"text": "name: Ada\nyears: [1815, 1852]"
}),
});
const data = await res.json();
console.log(data);
```
### XML ↔ JSON
POST https://tidybytetools.tidybytetools.workers.dev/v1/xml-json
Convert XML to JSON, or a JSON object back to XML.
Example body: {"direction":"to-json","text":"
Hello link
"} curl: ``` curl -sS https://tidybytetools.tidybytetools.workers.dev/v1/html-sanitize \ -H "Content-Type: application/json" \ -d '{"html":"Hello link
"}' ``` Python: ``` import requests r = requests.post( "https://tidybytetools.tidybytetools.workers.dev/v1/html-sanitize", json={ "html": "Hello link
" }, # headers={"Authorization": "Bearer tbt_YOUR_KEY"}, ) print(r.json()) ``` JavaScript: ``` const res = await fetch("https://tidybytetools.tidybytetools.workers.dev/v1/html-sanitize", { method: "POST", headers: { "Content-Type": "application/json", // Authorization: "Bearer tbt_YOUR_KEY", }, body: JSON.stringify({ "html": "Hello link
" }), }); const data = await res.json(); console.log(data); ``` ### Normalize dates POST https://tidybytetools.tidybytetools.workers.dev/v1/date-timezone Parse a messy date and convert it to a timezone you choose. Example body: {"text":"March 14, 2026 3:00 PM","sourceTimezone":"America/Chicago","targetTimezone":"UTC"} curl: ``` curl -sS https://tidybytetools.tidybytetools.workers.dev/v1/date-timezone \ -H "Content-Type: application/json" \ -d '{"text":"March 14, 2026 3:00 PM","sourceTimezone":"America/Chicago","targetTimezone":"UTC"}' ``` Python: ``` import requests r = requests.post( "https://tidybytetools.tidybytetools.workers.dev/v1/date-timezone", json={ "text": "March 14, 2026 3:00 PM", "sourceTimezone": "America/Chicago", "targetTimezone": "UTC" }, # headers={"Authorization": "Bearer tbt_YOUR_KEY"}, ) print(r.json()) ``` JavaScript: ``` const res = await fetch("https://tidybytetools.tidybytetools.workers.dev/v1/date-timezone", { method: "POST", headers: { "Content-Type": "application/json", // Authorization: "Bearer tbt_YOUR_KEY", }, body: JSON.stringify({ "text": "March 14, 2026 3:00 PM", "sourceTimezone": "America/Chicago", "targetTimezone": "UTC" }), }); const data = await res.json(); console.log(data); ``` ### URL encode or decode POST https://tidybytetools.tidybytetools.workers.dev/v1/url-codec Percent-encode or decode a string or query map. Example body: {"action":"encode","text":"hello world & cats"} curl: ``` curl -sS https://tidybytetools.tidybytetools.workers.dev/v1/url-codec \ -H "Content-Type: application/json" \ -d '{"action":"encode","text":"hello world & cats"}' ``` Python: ``` import requests r = requests.post( "https://tidybytetools.tidybytetools.workers.dev/v1/url-codec", json={ "action": "encode", "text": "hello world & cats" }, # headers={"Authorization": "Bearer tbt_YOUR_KEY"}, ) print(r.json()) ``` JavaScript: ``` const res = await fetch("https://tidybytetools.tidybytetools.workers.dev/v1/url-codec", { method: "POST", headers: { "Content-Type": "application/json", // Authorization: "Bearer tbt_YOUR_KEY", }, body: JSON.stringify({ "action": "encode", "text": "hello world & cats" }), }); const data = await res.json(); console.log(data); ``` ### Normalize Unicode POST https://tidybytetools.tidybytetools.workers.dev/v1/unicode NFC, NFD, NFKC, or NFKD normalization, plus a character count. Example body: {"text":"café","form":"NFC"} curl: ``` curl -sS https://tidybytetools.tidybytetools.workers.dev/v1/unicode \ -H "Content-Type: application/json" \ -d '{"text":"café","form":"NFC"}' ``` Python: ``` import requests r = requests.post( "https://tidybytetools.tidybytetools.workers.dev/v1/unicode", json={ "text": "café", "form": "NFC" }, # headers={"Authorization": "Bearer tbt_YOUR_KEY"}, ) print(r.json()) ``` JavaScript: ``` const res = await fetch("https://tidybytetools.tidybytetools.workers.dev/v1/unicode", { method: "POST", headers: { "Content-Type": "application/json", // Authorization: "Bearer tbt_YOUR_KEY", }, body: JSON.stringify({ "text": "café", "form": "NFC" }), }); const data = await res.json(); console.log(data); ``` ### Make IDs POST https://tidybytetools.tidybytetools.workers.dev/v1/id-generate Create a UUID, ULID, or NanoID. Example body: {"type":"uuid","count":2} curl: ``` curl -sS https://tidybytetools.tidybytetools.workers.dev/v1/id-generate \ -H "Content-Type: application/json" \ -d '{"type":"uuid","count":2}' ``` Python: ``` import requests r = requests.post( "https://tidybytetools.tidybytetools.workers.dev/v1/id-generate", json={ "type": "uuid", "count": 2 }, # headers={"Authorization": "Bearer tbt_YOUR_KEY"}, ) print(r.json()) ``` JavaScript: ``` const res = await fetch("https://tidybytetools.tidybytetools.workers.dev/v1/id-generate", { method: "POST", headers: { "Content-Type": "application/json", // Authorization: "Bearer tbt_YOUR_KEY", }, body: JSON.stringify({ "type": "uuid", "count": 2 }), }); const data = await res.json(); console.log(data); ``` ### Decode a JWT POST https://tidybytetools.tidybytetools.workers.dev/v1/jwt-decode Read a JWT header and payload. This does not check the signature. Example body: {"token":"eyJhbGciOiJub25lIn0.eyJzdWIiOiJhZGEifQ."} curl: ``` curl -sS https://tidybytetools.tidybytetools.workers.dev/v1/jwt-decode \ -H "Content-Type: application/json" \ -d '{"token":"eyJhbGciOiJub25lIn0.eyJzdWIiOiJhZGEifQ."}' ``` Python: ``` import requests r = requests.post( "https://tidybytetools.tidybytetools.workers.dev/v1/jwt-decode", json={ "token": "eyJhbGciOiJub25lIn0.eyJzdWIiOiJhZGEifQ." }, # headers={"Authorization": "Bearer tbt_YOUR_KEY"}, ) print(r.json()) ``` JavaScript: ``` const res = await fetch("https://tidybytetools.tidybytetools.workers.dev/v1/jwt-decode", { method: "POST", headers: { "Content-Type": "application/json", // Authorization: "Bearer tbt_YOUR_KEY", }, body: JSON.stringify({ "token": "eyJhbGciOiJub25lIn0.eyJzdWIiOiJhZGEifQ." }), }); const data = await res.json(); console.log(data); ``` ### Parse a cron expression POST https://tidybytetools.tidybytetools.workers.dev/v1/cron-parse Explain a 5- or 6-field cron string and list the next fire times in UTC. Example body: {"expression":"0 9 * * 1-5","count":3} curl: ``` curl -sS https://tidybytetools.tidybytetools.workers.dev/v1/cron-parse \ -H "Content-Type: application/json" \ -d '{"expression":"0 9 * * 1-5","count":3}' ``` Python: ``` import requests r = requests.post( "https://tidybytetools.tidybytetools.workers.dev/v1/cron-parse", json={ "expression": "0 9 * * 1-5", "count": 3 }, # headers={"Authorization": "Bearer tbt_YOUR_KEY"}, ) print(r.json()) ``` JavaScript: ``` const res = await fetch("https://tidybytetools.tidybytetools.workers.dev/v1/cron-parse", { method: "POST", headers: { "Content-Type": "application/json", // Authorization: "Bearer tbt_YOUR_KEY", }, body: JSON.stringify({ "expression": "0 9 * * 1-5", "count": 3 }), }); const data = await res.json(); console.log(data); ``` ### GTIN / EAN / UPC checksum POST https://tidybytetools.tidybytetools.workers.dev/v1/gtin-checksum Check or fill the check digit on a barcode number. Example body: {"code":"4006381333931","action":"check"} curl: ``` curl -sS https://tidybytetools.tidybytetools.workers.dev/v1/gtin-checksum \ -H "Content-Type: application/json" \ -d '{"code":"4006381333931","action":"check"}' ``` Python: ``` import requests r = requests.post( "https://tidybytetools.tidybytetools.workers.dev/v1/gtin-checksum", json={ "code": "4006381333931", "action": "check" }, # headers={"Authorization": "Bearer tbt_YOUR_KEY"}, ) print(r.json()) ``` JavaScript: ``` const res = await fetch("https://tidybytetools.tidybytetools.workers.dev/v1/gtin-checksum", { method: "POST", headers: { "Content-Type": "application/json", // Authorization: "Bearer tbt_YOUR_KEY", }, body: JSON.stringify({ "code": "4006381333931", "action": "check" }), }); const data = await res.json(); console.log(data); ``` ### Format SQL POST https://tidybytetools.tidybytetools.workers.dev/v1/sql-format Pretty-print a SQL query. This is a lightweight formatter, not a full SQL parser. Example body: {"sql":"select id,name from users where active=1 order by name"} curl: ``` curl -sS https://tidybytetools.tidybytetools.workers.dev/v1/sql-format \ -H "Content-Type: application/json" \ -d '{"sql":"select id,name from users where active=1 order by name"}' ``` Python: ``` import requests r = requests.post( "https://tidybytetools.tidybytetools.workers.dev/v1/sql-format", json={ "sql": "select id,name from users where active=1 order by name" }, # headers={"Authorization": "Bearer tbt_YOUR_KEY"}, ) print(r.json()) ``` JavaScript: ``` const res = await fetch("https://tidybytetools.tidybytetools.workers.dev/v1/sql-format", { method: "POST", headers: { "Content-Type": "application/json", // Authorization: "Bearer tbt_YOUR_KEY", }, body: JSON.stringify({ "sql": "select id,name from users where active=1 order by name" }), }); const data = await res.json(); console.log(data); ``` ### Convert units POST https://tidybytetools.tidybytetools.workers.dev/v1/unit-convert Convert length, mass, temperature, volume, time, area, speed, and data-size units. Example body: {"value":10,"from":"km","to":"mi"} curl: ``` curl -sS https://tidybytetools.tidybytetools.workers.dev/v1/unit-convert \ -H "Content-Type: application/json" \ -d '{"value":10,"from":"km","to":"mi"}' ``` Python: ``` import requests r = requests.post( "https://tidybytetools.tidybytetools.workers.dev/v1/unit-convert", json={ "value": 10, "from": "km", "to": "mi" }, # headers={"Authorization": "Bearer tbt_YOUR_KEY"}, ) print(r.json()) ``` JavaScript: ``` const res = await fetch("https://tidybytetools.tidybytetools.workers.dev/v1/unit-convert", { method: "POST", headers: { "Content-Type": "application/json", // Authorization: "Bearer tbt_YOUR_KEY", }, body: JSON.stringify({ "value": 10, "from": "km", "to": "mi" }), }); const data = await res.json(); console.log(data); ``` ## What this API does not do It does not extract PDFs or Word files, crawl websites, or convert images. Those heavier tools belong on a later Render API and on our paid Apify actors.